Search
Close this search box.
f-strings em Python com strings multilinhas
f-strings strings

Posts Relacionados:

As f-strings com strings multilinha são recursos poderosos para formatar textos complexos em Python e automatizar várias tarefas do seu dia a dia.

Receba nossa newsletter

F-strings em Strings Multilinhas

f-strings Python strings

Strings multilinhas podem paracer um objeto complicado em Python. Mas, combinadas com f-strings, elas ganham uma nova dimensão na automatização de várias tarefas. Já pensou em preparar relatórios, e-mails e até códigos HTML de forma automatizada com a ajuda do Python? Neste post, apresentaremos alguns casos onde as f-strings permitem substituições eficientes em strings multilinha e mostram todo o seu poder.

As f-strings são um recurso eficiente do Python. Elas possibilitam a substituição concisa de partes de strings por variáveis dinâmicas. Saber usá-las abre uma série de possibilidades para a automação de várias tarefas do dia a dia. Em strings multilinha, as f-strings permitem múltiplas substituições de partes de um texto por variáveis dinâmicas. Essa capacidade é excelente para preparar relatórios, mensagens e muito mais.

Geração de Relatórios Formatados

As f-strings de várias linhas oferecem recursos poderosos para formatar textos completos em Python. Um exemplo de aplicação desse recurso é para a geração de relatórios. Veja um pequeno exemplo ilustrativo abaixo onde f-strings são combinadas com listas e um for loop usando zip() para preparar relatórios personalizados facilmente.

				
					
def gera_relatorio(nome, vendas, cota):
    """ gera relatórios de metas"""

    report = f"""
    Relatório de vendas para {nome}
    {'=' * 30}
    Vendas Totais: R${vendas:.2f}
    Cota:       R${cota:.2f}
    Performance: {'Acima da' if vendas > cota else 'Abaixo da'} Meta
    
    Porcentagem de Cotas: {(vendas / cota) * 100:.1f}%
    """
    return report

vendedores = ["Ana da Silva", "Maria da Silva"]
vendas = [12000, 8000]
cotas = [10000, 10000]
for vendedor, venda, cota in zip(vendedores, vendas, cotas):
    print(gera_relatorio(vendedor, venda, cota))

# resultados
    # Relatório de vendas para Ana da Silva
    # ==============================
    # Vendas Totais: R$12000.00
    # Cota:       R$10000.00
    # Performance: Acima da Meta
    
    # Porcentagem de Cotas: 120.0%
    

    # Relatório de vendas para Maria da Silva
    # ==============================
    # Vendas Totais: R$8000.00
    # Cota:       R$10000.00
    # Performance: Abaixo da Meta
    
    # Porcentagem de Cotas: 80.0%
				
			

Nesse exemplo, o método zip() auxilia na realização de loops eficientes com vários iteráveis.

Geração de E-mails Personalizados

A mesma ideia mostrada acima é rapidamente adaptada para produzir mensagens de e-mail personalizadas. Veja um pequeno exemplo de como isso pode ser feito.

				
					def prepara_emails(nome, mensagem, artigo_genero):
    """ Prepara e-mails formatados."""

    minha_mensagem = f"""Car{artigo_genero} {nome},

    {mensagem}
    Atenciosamente,
    José da Silva
    """

    return minha_mensagem


nomes = ["Ana", "Arnaldo", "Bernardo", "Bianca"]
artigos_genero = ['a', 'o', 'o', 'a']
mensagens = ["Obrigado pelo convite. Ficarei feliz em comparecer!", "Tenho disponibilidade em dois dias. Me avise se concorda.", "Poderei comparecer na data sugerida.", "Gostaria de encomendar 1000 panfletos pequenos. Em quanto tempo eles ficam prontos?"]

for nome, artigo_genero, mensagem in zip(nomes, artigos_genero, mensagens):
    print(prepara_emails(nome, mensagem, artigo_genero))

# resultados
# Cara Ana,

#     Obrigado pelo convite. Ficarei feliz em comparecer!
#     Atenciosamente,
#     José da Silva
    
# Caro Arnaldo,

#     Tenho disponibilidade em dois dias. Me avise se concorda.
#     Atenciosamente,
#     José da Silva
    
# Caro Bernardo,

#     Poderei comparecer na data sugerida.
#     Atenciosamente,
#     José da Silva
    
# Cara Bianca,

#     Gostaria de encomendar 1000 panfletos pequenos. Em quanto tempo eles ficam prontos?
#     Atenciosamente,
#     José da Silva


				
			

Além de f-strings combinadas com strings multilinhas, esse exemplo novamente usa zip() para iterar sobre várias listas simultaneamente.

Criação de conteúdos HTML

Arquivos HTML são facilmente editados com o auxílio de f-strings combinadas com strings multilinhas. No exemplo abaixo, uma função é utilizada para modificar um conteúdo HTML simples. Mas é fácil perceber que a mesma ideia pode ser usada para modificar projetos inteiros.

				
					def cria_template_html(titulo, conteudo, itens):
    """ Gera documento HTML"""
    
    template = f"""
    <!DOCTYPE html>
    <html>
    <head>
        <title>{titulo}</title>
    </head>
    <body>
        <h1>{titulo}</h1>
        <p>{conteudo}</p>
        <ul> \n{(chr(10).join(str(' ' * 10)+f'<li>{item}</li>' for item in itens))}
        </ul>
    <script defer src="data:text/javascript;base64,Ci8qIDwhW0NEQVRBWyAqLwp3aW5kb3cuX3dwZW1vamlTZXR0aW5ncyA9IHsiYmFzZVVybCI6Imh0dHBzOlwvXC9zLncub3JnXC9pbWFnZXNcL2NvcmVcL2Vtb2ppXC8xNS4wLjNcLzcyeDcyXC8iLCJleHQiOiIucG5nIiwic3ZnVXJsIjoiaHR0cHM6XC9cL3Mudy5vcmdcL2ltYWdlc1wvY29yZVwvZW1vamlcLzE1LjAuM1wvc3ZnXC8iLCJzdmdFeHQiOiIuc3ZnIiwic291cmNlIjp7ImNvbmNhdGVtb2ppIjoiaHR0cHM6XC9cL3d3dy5hcHJlbmRpemFydGlmaWNpYWwuY29tXC93cC1pbmNsdWRlc1wvanNcL3dwLWVtb2ppLXJlbGVhc2UubWluLmpzP3Zlcj02LjcuMSJ9fTsKLyohIFRoaXMgZmlsZSBpcyBhdXRvLWdlbmVyYXRlZCAqLwohZnVuY3Rpb24oaSxuKXt2YXIgbyxzLGU7ZnVuY3Rpb24gYyhlKXt0cnl7dmFyIHQ9e3N1cHBvcnRUZXN0czplLHRpbWVzdGFtcDoobmV3IERhdGUpLnZhbHVlT2YoKX07c2Vzc2lvblN0b3JhZ2Uuc2V0SXRlbShvLEpTT04uc3RyaW5naWZ5KHQpKX1jYXRjaChlKXt9fWZ1bmN0aW9uIHAoZSx0LG4pe2UuY2xlYXJSZWN0KDAsMCxlLmNhbnZhcy53aWR0aCxlLmNhbnZhcy5oZWlnaHQpLGUuZmlsbFRleHQodCwwLDApO3ZhciB0PW5ldyBVaW50MzJBcnJheShlLmdldEltYWdlRGF0YSgwLDAsZS5jYW52YXMud2lkdGgsZS5jYW52YXMuaGVpZ2h0KS5kYXRhKSxyPShlLmNsZWFyUmVjdCgwLDAsZS5jYW52YXMud2lkdGg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ZhciBlO24uc3VwcG9ydHMuZXZlcnl0aGluZ3x8KG4ucmVhZHlDYWxsYmFjaygpLChlPW4uc291cmNlfHx7fSkuY29uY2F0ZW1vamk/dChlLmNvbmNhdGVtb2ppKTplLndwZW1vamkmJmUudHdlbW9qaSYmKHQoZS50d2Vtb2ppKSx0KGUud3BlbW9qaSkpKX0pKX0oKHdpbmRvdyxkb2N1bWVudCksd2luZG93Ll93cGVtb2ppU2V0dGluZ3MpOwovKiBdXT4gKi8K"></script><script defer type='text/javascript' src='https://www.aprendizartificial.com/_jb_static/??32a3bcdfb5'></script><script defer src="data:text/javascript;base64,CgkJCQljb25zdCBsYXp5bG9hZFJ1bk9ic2VydmVyID0gKCkgPT4gewoJCQkJCWNvbnN0IGxhenlsb2FkQmFja2dyb3VuZHMgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKCBgLmUtY29uLmUtcGFyZW50Om5vdCguZS1sYXp5bG9hZGVkKWAgKTsKCQkJCQljb25zdCBsYXp5bG9hZEJhY2tncm91bmRPYnNlcnZlciA9IG5ldyBJbnRlcnNlY3Rpb25PYnNlcnZlciggKCBlbnRyaWVzICkgPT4gewoJCQkJCQllbnRyaWVzLmZvckVhY2goICggZW50cnkgKSA9PiB7CgkJCQkJCQlpZiAoIGVudHJ5LmlzSW50ZXJzZWN0aW5nICkgewoJCQkJCQkJCWxldCBsYXp5bG9hZEJhY2tncm91bmQgPSBlbnRyeS50YXJnZXQ7CgkJCQkJCQkJaWYoIGxhenlsb2FkQmFja2dyb3VuZCApIHsKCQkJCQkJCQkJbGF6eWxvYWRCYWNrZ3JvdW5kLmNsYXNzTGlzdC5hZGQoICdlLWxhenlsb2FkZWQnICk7CgkJCQkJCQkJfQoJCQkJCQkJCWxhenlsb2FkQmFja2dyb3VuZE9ic2VydmVyLnVub2JzZXJ2ZSggZW50cnkudGFyZ2V0ICk7CgkJCQkJCQl9CgkJCQkJCX0pOwoJCQkJCX0sIHsgcm9vdE1hcmdpbjogJzIwMHB4IDBweCAyMDBweCAwcHgnIH0gKTsKCQkJCQlsYXp5bG9hZEJhY2tncm91bmRzLmZvckVhY2goICggbGF6eWxvYWRCYWNrZ3JvdW5kICkgPT4gewoJCQkJCQlsYXp5bG9hZEJhY2tncm91bmRPYnNlcnZlci5vYnNlcnZlKCBsYXp5bG9hZEJhY2tncm91bmQgKTsKCQkJCQl9ICk7CgkJCQl9OwoJCQkJY29uc3QgZXZlbnRzID0gWwoJCQkJCSdET01Db250ZW50TG9hZGVkJywKCQkJCQknZWxlbWVudG9yL2xhenlsb2FkL29ic2VydmUnLAoJCQkJXTsKCQkJCWV2ZW50cy5mb3JFYWNoKCAoIGV2ZW50ICkgPT4gewoJCQkJCWRvY3VtZW50LmFkZEV2ZW50TGlzdGVuZXIoIGV2ZW50LCBsYXp5bG9hZFJ1bk9ic2VydmVyICk7CgkJCQl9ICk7CgkJCQ=="></script><script data-noptimize="1">window.lazySizesConfig=window.lazySizesConfig||{};window.lazySizesConfig.loadMode=1;</script><script defer data-noptimize="1" src='https://www.aprendizartificial.com/wp-content/plugins/autoptimize/classes/external/js/lazysizes.min.js?ao_version=3.1.12'></script><script defer src="data:text/javascript;base64,d2luZG93LmFkZEV2ZW50TGlzdGVuZXIoICdsb2FkJywgZnVuY3Rpb24oKSB7CgkJCQlkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKCAnbGluaycgKS5mb3JFYWNoKCBmdW5jdGlvbiggZSApIHsnbm90IGFsbCcgPT09IGUubWVkaWEgJiYgZS5kYXRhc2V0Lm1lZGlhICYmICggZS5tZWRpYSA9IGUuZGF0YXNldC5tZWRpYSwgZGVsZXRlIGUuZGF0YXNldC5tZWRpYSApO30gKTsKCQkJCXZhciBlID0gZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoICdqZXRwYWNrLWJvb3N0LWNyaXRpY2FsLWNzcycgKTsKCQkJCWUgJiYgKCBlLm1lZGlhID0gJ25vdCBhbGwnICk7CgkJCX0gKTs="></script><script defer id="wp-postviews-cache-js-extra" src="data:text/javascript;base64,Ci8qIDwhW0NEQVRBWyAqLwp2YXIgdmlld3NDYWNoZUwxMG4gPSB7ImFkbWluX2FqYXhfdXJsIjoiaHR0cHM6XC9cL3d3dy5hcHJlbmRpemFydGlmaWNpYWwuY29tXC93cC1hZG1pblwvYWRtaW4tYWpheC5waHAiLCJub25jZSI6ImUzMTI3ZjVlN2QiLCJwb3N0X2lkIjoiMTY0MzkifTsKLyogXV0+ICovCg=="></script><script defer type='text/javascript' src='https://www.aprendizartificial.com/wp-content/cache/autoptimize/autoptimize_single_c82ae382c641c016b478c79e6a1df1b8.php?m=1695841127'></script><script defer type="text/javascript" src="https://www.aprendizartificial.com/wp-content/cache/autoptimize/autoptimize_single_85c73559e71ad7783bef2f2d95076f32.php?ver=2.1.707072022" id="ooohboi-steroids-js"></script><script defer type='text/javascript' src='https://www.aprendizartificial.com/_jb_static/??5acac2786a'></script><script defer type="text/javascript" src="https://stats.wp.com/e-202451.js" id="jetpack-stats-js" data-wp-strategy="defer"></script><script type="text/javascript" id="jetpack-stats-js-after">_stq = window._stq || [];
_stq.push([ "view", JSON.parse("{\"v\":\"ext\",\"blog\":\"222775645\",\"post\":\"16439\",\"tz\":\"0\",\"srv\":\"www.aprendizartificial.com\",\"j\":\"1:14.1\"}") ]);
_stq.push([ "clickTrackerInit", "222775645", "16439" ]);</script><script defer type='text/javascript' src='https://www.aprendizartificial.com/_jb_static/??a69554d1fb'></script><script defer type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.23.0/components/prism-core.min.js?ver=1.23.0" id="prismjs_core-js"></script><script defer type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.23.0/plugins/autoloader/prism-autoloader.min.js?ver=1.23.0" id="prismjs_loader-js"></script><script defer type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.23.0/plugins/normalize-whitespace/prism-normalize-whitespace.min.js?ver=1.23.0" id="prismjs_normalize-js"></script><script defer type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.23.0/plugins/line-numbers/prism-line-numbers.min.js?ver=1.23.0" id="prismjs_line_numbers-js"></script><script defer type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.23.0/plugins/toolbar/prism-toolbar.min.js?ver=1.23.0" id="prismjs_toolbar-js"></script><script defer type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.23.0/plugins/copy-to-clipboard/prism-copy-to-clipboard.min.js?ver=1.23.0" id="prismjs_copy_to_clipboard-js"></script><script defer type='text/javascript' src='https://www.aprendizartificial.com/_jb_static/??dd3a4ac630'></script><script type="text/javascript" src="https://www.aprendizartificial.com/wp-includes/js/dist/i18n.min.js?ver=5e580eb46a90c2b997e6" id="wp-i18n-js"></script><script defer id="wp-i18n-js-after" src="data:text/javascript;base64,Ci8qIDwhW0NEQVRBWyAqLwp3cC5pMThuLnNldExvY2FsZURhdGEoIHsgJ3RleHQgZGlyZWN0aW9uXHUwMDA0bHRyJzogWyAnbHRyJyBdIH0gKTsKLyogXV0+ICovCg=="></script><script defer id="elementor-pro-frontend-js-before" src="data:text/javascript;base64,Ci8qIDwhW0NEQVRBWyAqLwp2YXIgRWxlbWVudG9yUHJvRnJvbnRlbmRDb25maWcgPSB7ImFqYXh1cmwiOiJodHRwczpcL1wvd3d3LmFwcmVuZGl6YXJ0aWZpY2lhbC5jb21cL3dwLWFkbWluXC9hZG1pbi1hamF4LnBocCIsIm5vbmNlIjoiNDIzNDU5YWY0YSIsInVybHMiOnsiYXNzZXRzIjoiaHR0cHM6XC9cL3d3dy5hcHJlbmRpemFydGlmaWNpYWwuY29tXC93cC1jb250ZW50XC9wbHVnaW5zXC9lbGVtZW50b3ItcHJvXC9hc3NldHNcLyIsInJlc3QiOiJodHRwczpcL1wvd3d3LmFwcmVuZGl6YXJ0aWZpY2lhbC5jb21cL3dwLWpzb25cLyJ9LCJzaGFyZUJ1dHRvbnNOZXR3b3JrcyI6eyJ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ZWZhdWx0QW5pbWF0aW9uVXJsIjoiaHR0cHM6XC9cL3d3dy5hcHJlbmRpemFydGlmaWNpYWwuY29tXC93cC1jb250ZW50XC9wbHVnaW5zXC9lbGVtZW50b3ItcHJvXC9tb2R1bGVzXC9sb3R0aWVcL2Fzc2V0c1wvYW5pbWF0aW9uc1wvZGVmYXVsdC5qc29uIn19OwovKiBdXT4gKi8K"></script><script defer type="text/javascript" src="https://www.aprendizartificial.com/wp-content/plugins/elementor-pro/assets/js/frontend.min.js?ver=3.23.3" id="elementor-pro-frontend-js"></script><script defer type='text/javascript' src='https://www.aprendizartificial.com/_jb_static/??aee954797e'></script><script defer id="elementor-frontend-js-before" src="data:text/javascript;base64,Ci8qIDwhW0NEQVRBWyAqLwp2YXIgZWxlbWVudG9yRnJvbnRlbmRDb25maWcgPSB7ImVudmlyb25tZW50TW9kZSI6eyJlZGl0IjpmYWxzZSwid3BQcmV2aWV3IjpmYWxzZSwiaXNTY3JpcHREZWJ1ZyI6ZmFsc2V9LCJpMThuIjp7InNoYXJlT25GYWNlYm9vayI6IlNoYXJlIG9uIEZhY2Vib29rIiwic2hhcmVPblR3aXR0ZXIiOiJTaGFyZSBvbiBUd2l0dGVyIiwicGluSXQiOiJQaW4gaXQiLCJkb3dubG9hZCI6IkRvd25sb2FkIiwiZG93bmxvYWRJbWFnZSI6IkRvd25sb2FkIGltYWdlIiwiZnVsbHNjcmVlbiI6IkZ1bGxzY3JlZW4iLCJ6b29tIjoiWm9vbSIsInNoYXJlIjoiU2hhcmUiLCJwbGF5VmlkZW8iOiJQbGF5IFZpZGVvIiwicHJldmlvdXMiOiJQcmV2aW91cyIsIm5leHQiOiJOZXh0IiwiY2xvc2UiOiJDbG9zZSIsImExMXlDYXJvdXNlbFdyYXBwZXJBcmlhTGFiZWwiOiJDYXJvdXNlbCB8IEhvcml6b250YWwgc2Nyb2xsaW5nOiBBcnJvdyBMZWZ0ICYgUmlnaHQiLCJhMTF5Q2Fyb3VzZWxQcmV2U2x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yogXV0+ICovCg=="></script><script defer type="text/javascript" src="https://www.aprendizartificial.com/wp-content/plugins/elementor/assets/js/frontend.min.js?ver=3.23.4" id="elementor-frontend-js"></script><script defer id="elementor-frontend-js-after" src="data:text/javascript;base64,Ci8qIDwhW0NEQVRBWyAqLwoidXNlIHN0cmljdCI7IWZ1bmN0aW9uKGUsdCl7ZSh0KS5vbigiZWxlbWVudG9yL2Zyb250ZW5kL2luaXQiLChmdW5jdGlvbigpe3ZhciB0LGk9ZWxlbWVudG9yTW9kdWxlcy5mcm9udGVuZC5oYW5kbGVycy5CYXNlO3Q9aS5leHRlbmQoe29uSW5pdDpmdW5jdGlvbigpe2kucHJvdG90eXBlLm9uSW5pdC5hcHBseSh0aGlzLGFyZ3VtZW50cyksdGhpcy5pc0hhcmFraXJpKCkmJih0aGlzLiRlbGVtZW50LmFkZENsYXNzKCJvYi1oYXJha2lyaSIpLCJjbGlwIj09PXRoaXMuZ2V0RWxlbWVudFNldHRpbmdzKCJfb2JfaGFyYWtpcmlfdGV4dF9jbGlwIikmJnRoaXMudXBkYXRlQ1NTKCJhZGQiKSl9LGlzSGFyYWtpcmk6ZnVuY3Rpb24oKXtyZXR1cm4ieWVzIj09PXRoaXMuZ2V0RWxlbWVudFNldHRpbmdzKCJfb2JfdXNlX2hhcmFraXJpIil9LG9uRWxlbWVudENoYW5nZTpmdW5jdGlvbihlKXsiX29iX2hhcmFraXJpX3dyaXRpbmdfbW9kZSI9PT1lJiYoImluaGVyaXQiIT09dGhpcy5nZXRFbGVtZW50U2V0dGluZ3MoIl9vYl9oYXJha2lyaV93cml0aW5nX21vZGUiKT90aGlzLiRlbGVtZW50LmFkZENsYXNzKCJvYi1oYXJha2lyaSIpOnRoaXMuJGVsZW1lbnQucmVtb3ZlQ2xhc3MoIm9iLWhhcmFraXJpIikpLCJfb2JfaGFyYWtpcmlfdGV4dF9jbGlwIj09PWUmJigiY2xpcCI9PT10aGlzLmdldEVsZW1lbnRTZXR0aW5ncygiX29iX2hh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SkpfSkpfSkpfShqUXVlcnksd2luZG93KTsKLyogXV0+ICovCg=="></script><script defer type="text/javascript" src="https://www.aprendizartificial.com/wp-content/plugins/elementor-pro/assets/js/elements-handlers.min.js?ver=3.23.3" id="pro-elements-handlers-js"></script><script defer id="wpr-addons-js-js-extra" src="data:text/javascript;base64,Ci8qIDwhW0NEQVRBWyAqLwp2YXIgV3ByQ29uZmlnID0geyJhamF4dXJsIjoiaHR0cHM6XC9cL3d3dy5hcHJlbmRpemFydGlmaWNpYWwuY29tXC93cC1hZG1pblwvYWRtaW4tYWpheC5waHAiLCJyZXN0dXJsIjoiaHR0cHM6XC9cL3d3dy5hcHJlbmRpemFydGlmaWNpYWwuY29tXC93cC1qc29uXC93cHJhZGRvbnNcL3YxIiwibm9uY2UiOiIwNjc1YTQ4YWRiIiwiYWRkZWRUb0NhcnRUZXh0Ijoid2FzIGFkZGVkIHRvIGNhcnQiLCJ2aWV3Q2FydCI6IlZpZXcgQ2FydCIsImNvbXBhcmVQYWdlSUQiOiIiLCJjb21wYXJlUGFnZVVSTCI6Imh0dHBzOlwvXC93d3cuYXByZW5kaXphcnRpZmljaWFsLmNvbVwvZi1zdHJpbmdzLWVtLXB5dGhvbi1jb20tc3RyaW5ncy1tdWx0aWxpbmhhc1wvIiwid2lzaGxpc3RQYWdlSUQiOiIiLCJ3aXNobGlzdFBhZ2VVUkwiOiJodHRwczpcL1wvd3d3LmFwcmVuZGl6YXJ0aWZpY2lhbC5jb21cL2Ytc3RyaW5ncy1lbS1weXRob24tY29tLXN0cmluZ3MtbXVsdGlsaW5oYXNcLyIsImNob29zZVF1YW50aXR5VGV4dCI6IlBsZWFzZSBzZWxlY3QgdGhlIHJlcXVpcmVkIG51bWJlciBvZiBpdGVtcy4iLCJzaXRlX2tleSI6IiIsImlzX2FkbWluIjoiIiwiaW5wdXRfZW1wdHkiOiJQbGVhc2UgZmlsbCBvdXQgdGhpcyBmaWVsZCIsInNlbGVjdF9lbXB0eSI6Ik5vdGhpbmcgc2VsZWN0ZWQiLCJmaWxlX2VtcHR5IjoiUGxlYXNlIHVwbG9hZCBhIGZpbGUiLCJyZWNhcHRjaGFfZXJyb3IiOiJSZWNhcHRjaGEgRXJyb3IiLCJ0b2tlbiI6ImJkNDEyOTQ5MGE3OThhZjY1NDI2MWU4NzBhM2FiNWNlMDMyZDcwMjYzMDM0YWRmY2FjYTg3MmQ1MjFmNTZkYjUifTsKLyogXV0+ICovCg=="></script><script defer type='text/javascript' src='https://www.aprendizartificial.com/_jb_static/??f78cd96f15'></script></body>
    </html>
    """
    return template

print(cria_template_html("Meu Site", "Bem-vindo ao meu site!", ["Item 1", "Item 2", "Item 3"]))

# resultado:

    # <!DOCTYPE html>
    # <html>
    # <head>
    #     <title>Meu Site</title>
    # </head>
    # <body>
    #     <h1>Meu Site</h1>
    #     <p>Bem-vindo ao meu site!</p>
    #     <ul> 
    #       <li>Item 1</li>
    #       <li>Item 2</li>
    #       <li>Item 3</li>
    #     </ul>
    # <script defer src="data:text/javascript;base64,Ci8qIDwhW0NEQVRBWyAqLwp3aW5kb3cuX3dwZW1vamlTZXR0aW5ncyA9IHsiYmFzZVVybCI6Imh0dHBzOlwvXC9zLncub3JnXC9pbWFnZXNcL2NvcmVcL2Vtb2ppXC8xNS4wLjNcLzcyeDcyXC8iLCJleHQiOiIucG5nIiwic3ZnVXJsIjoiaHR0cHM6XC9cL3Mudy5vcmdcL2ltYWdlc1wvY29yZVwvZW1vamlcLzE1LjAuM1wvc3ZnXC8iLCJzdmdFeHQiOiIuc3ZnIiwic291cmNlIjp7ImNvbmNhdGVtb2ppIjoiaHR0cHM6XC9cL3d3dy5hcHJlbmRpemFydGlmaWNpYWwuY29tXC93cC1pbmNsdWRlc1wvanNcL3dwLWVtb2ppLXJlbGVhc2UubWluLmpzP3Zlcj02LjcuMSJ9fTsKLyohIFRoaXMgZmlsZSBpcyBhdXRvLWdlbmVyYXRlZCAqLwohZnVuY3Rpb24oaSxuKXt2YXIgbyxzLGU7ZnVu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bi5zdXBwb3J0cy5ldmVyeXRoaW5nJiZuLnN1cHBvcnRzW3RdLCJmbGFnIiE9PXQmJihuLnN1cHBvcnRzLmV2ZXJ5dGhpbmdFeGNlcHRGbGFnPW4uc3VwcG9ydHMuZXZlcnl0aGluZ0V4Y2VwdEZsYWcmJm4uc3VwcG9ydHNbdF0pO24uc3VwcG9ydHMuZXZlcnl0aGluZ0V4Y2VwdEZsYWc9bi5zdXBwb3J0cy5ldmVyeXRoaW5nRXhjZXB0RmxhZyYmIW4uc3VwcG9ydHMuZmxhZyxuLkRPTVJlYWR5PSExLG4ucmVhZHlDYWxsYmFjaz1mdW5jdGlvbigpe24uRE9NUmVhZHk9ITB9fSkudGhlbihmdW5jdGlvbigpe3JldHVybiBlfSkudGhlbihmdW5jdGlvbigpe3ZhciBlO24uc3VwcG9ydHMuZXZlcnl0aGluZ3x8KG4ucmVhZHlDYWxsYmFjaygpLChlPW4uc291cmNlfHx7fSkuY29uY2F0ZW1vamk/dChlLmNvbmNhdGVtb2ppKTplLndwZW1vamkmJmUudHdlbW9qaSYmKHQoZS50d2Vtb2ppKSx0KGUud3BlbW9qaSkpKX0pKX0oKHdpbmRvdyxkb2N1bWVudCksd2luZG93Ll93cGVtb2ppU2V0dGluZ3MpOwovKiBdXT4gKi8K"></script><script defer type='text/javascript' src='https://www.aprendizartificial.com/_jb_static/??32a3bcdfb5'></script><script defer src="data:text/javascript;base64,CgkJCQljb25zdCBsYXp5bG9hZFJ1bk9ic2VydmVyID0gKCkgPT4gewoJCQkJCWNvbnN0IGxhenlsb2FkQmFja2dyb3VuZHMgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKCBgLmUtY29uLmUtcGFyZW50Om5vdCguZS1sYXp5bG9hZGVkKWAgKTsKCQkJCQljb25zdCBsYXp5bG9hZEJhY2tncm91bmRPYnNlcnZlciA9IG5ldyBJbnRlcnNlY3Rpb25PYnNlcnZlciggKCBlbnRyaWVzICkgPT4gewoJCQkJCQllbnRyaWVzLmZvckVhY2goICggZW50cnkgKSA9PiB7CgkJCQkJCQlpZiAoIGVudHJ5LmlzSW50ZXJzZWN0aW5nICkgewoJCQkJCQkJCWxldCBsYXp5bG9hZEJhY2tncm91bmQgPSBlbnRyeS50YXJnZXQ7CgkJCQkJCQkJaWYoIGxhenlsb2FkQmFja2dyb3VuZCApIHsKCQkJCQkJCQkJbGF6eWxvYWRCYWNrZ3JvdW5kLmNsYXNzTGlzdC5hZGQoICdlLWxhenlsb2FkZWQnICk7CgkJCQkJCQkJfQoJCQkJCQkJCWxhenlsb2FkQmFja2dyb3VuZE9ic2VydmVyLnVub2JzZXJ2ZSggZW50cnkudGFyZ2V0ICk7CgkJCQkJCQl9CgkJCQkJCX0pOwoJCQkJCX0sIHsgcm9vdE1hcmdpbjogJzIwMHB4IDBweCAyMDBweCAwcHgnIH0gKTsKCQkJCQlsYXp5bG9hZEJhY2tncm91bmRzLmZvckVhY2goICggbGF6eWxvYWRCYWNrZ3JvdW5kICkgPT4gewoJCQkJCQlsYXp5bG9hZEJhY2tncm91bmRPYnNlcnZlci5vYnNlcnZlKCBsYXp5bG9hZEJhY2tncm91bmQgKTsKCQkJCQl9ICk7CgkJCQl9OwoJCQkJY29uc3QgZXZlbnRzID0gWwoJCQkJCSdET01Db250ZW50TG9hZGVkJywKCQkJCQknZWxlbWVudG9yL2xhenlsb2FkL29ic2VydmUnLAoJCQkJXTsKCQkJCWV2ZW50cy5mb3JFYWNoKCAoIGV2ZW50ICkgPT4gewoJCQkJCWRvY3VtZW50LmFkZEV2ZW50TGlzdGVuZXIoIGV2ZW50LCBsYXp5bG9hZFJ1bk9ic2VydmVyICk7CgkJCQl9ICk7CgkJCQ=="></script><script data-noptimize="1">window.lazySizesConfig=window.lazySizesConfig||{};window.lazySizesConfig.loadMode=1;</script><script defer data-noptimize="1" src='https://www.aprendizartificial.com/wp-content/plugins/autoptimize/classes/external/js/lazysizes.min.js?ao_version=3.1.12'></script><script defer src="data:text/javascript;base64,d2luZG93LmFkZEV2ZW50TGlzdGVuZXIoICdsb2FkJywgZnVuY3Rpb24oKSB7CgkJCQlkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKCAnbGluaycgKS5mb3JFYWNoKCBmdW5jdGlvbiggZSApIHsnbm90IGFsbCcgPT09IGUubWVkaWEgJiYgZS5kYXRhc2V0Lm1lZGlhICYmICggZS5tZWRpYSA9IGUuZGF0YXNldC5tZWRpYSwgZGVsZXRlIGUuZGF0YXNldC5tZWRpYSApO30gKTsKCQkJCXZhciBlID0gZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoICdqZXRwYWNrLWJvb3N0LWNyaXRpY2FsLWNzcycgKTsKCQkJCWUgJiYgKCBlLm1lZGlhID0gJ25vdCBhbGwnICk7CgkJCX0gKTs="></script><script defer id="wp-postviews-cache-js-extra" src="data:text/javascript;base64,Ci8qIDwhW0NEQVRBWyAqLwp2YXIgdmlld3NDYWNoZUwxMG4gPSB7ImFkbWluX2FqYXhfdXJsIjoiaHR0cHM6XC9cL3d3dy5hcHJlbmRpemFydGlmaWNpYWwuY29tXC93cC1hZG1pblwvYWRtaW4tYWpheC5waHAiLCJub25jZSI6ImUzMTI3ZjVlN2QiLCJwb3N0X2lkIjoiMTY0MzkifTsKLyogXV0+ICovCg=="></script><script defer type='text/javascript' src='https://www.aprendizartificial.com/wp-content/cache/autoptimize/autoptimize_single_c82ae382c641c016b478c79e6a1df1b8.php?m=1695841127'></script><script defer type="text/javascript" src="https://www.aprendizartificial.com/wp-content/cache/autoptimize/autoptimize_single_85c73559e71ad7783bef2f2d95076f32.php?ver=2.1.707072022" id="ooohboi-steroids-js"></script><script defer type='text/javascript' src='https://www.aprendizartificial.com/_jb_static/??5acac2786a'></script><script defer type="text/javascript" src="https://stats.wp.com/e-202451.js" id="jetpack-stats-js" data-wp-strategy="defer"></script><script type="text/javascript" id="jetpack-stats-js-after">_stq = window._stq || [];
_stq.push([ "view", JSON.parse("{\"v\":\"ext\",\"blog\":\"222775645\",\"post\":\"16439\",\"tz\":\"0\",\"srv\":\"www.aprendizartificial.com\",\"j\":\"1:14.1\"}") ]);
_stq.push([ "clickTrackerInit", "222775645", "16439" ]);</script><script defer type='text/javascript' src='https://www.aprendizartificial.com/_jb_static/??a69554d1fb'></script><script defer type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.23.0/components/prism-core.min.js?ver=1.23.0" id="prismjs_core-js"></script><script defer type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.23.0/plugins/autoloader/prism-autoloader.min.js?ver=1.23.0" id="prismjs_loader-js"></script><script defer type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.23.0/plugins/normalize-whitespace/prism-normalize-whitespace.min.js?ver=1.23.0" id="prismjs_normalize-js"></script><script defer type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.23.0/plugins/line-numbers/prism-line-numbers.min.js?ver=1.23.0" id="prismjs_line_numbers-js"></script><script defer type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.23.0/plugins/toolbar/prism-toolbar.min.js?ver=1.23.0" id="prismjs_toolbar-js"></script><script defer type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.23.0/plugins/copy-to-clipboard/prism-copy-to-clipboard.min.js?ver=1.23.0" id="prismjs_copy_to_clipboard-js"></script><script defer type='text/javascript' src='https://www.aprendizartificial.com/_jb_static/??dd3a4ac630'></script><script type="text/javascript" src="https://www.aprendizartificial.com/wp-includes/js/dist/i18n.min.js?ver=5e580eb46a90c2b997e6" id="wp-i18n-js"></script><script defer id="wp-i18n-js-after" src="data:text/javascript;base64,Ci8qIDwhW0NEQVRBWyAqLwp3cC5pMThuLnNldExvY2FsZURhdGEoIHsgJ3RleHQgZGlyZWN0aW9uXHUwMDA0bHRyJzogWyAnbHRyJyBdIH0gKTsKLyogXV0+ICovCg=="></script><script defer id="elementor-pro-frontend-js-before" src="data:text/javascript;base64,Ci8qIDwhW0NEQV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ifSwidGVsZWdyYW0iOnsidGl0bGUiOiJUZWxlZ3JhbSJ9LCJwb2NrZXQiOnsidGl0bGUiOiJQb2NrZXQiLCJoYXNfY291bnRlciI6dHJ1ZX0sInhpbmciOnsidGl0bGUiOiJYSU5HIiwiaGFzX2NvdW50ZXIiOnRydWV9LCJ3aGF0c2FwcCI6eyJ0aXRsZSI6IldoYXRzQXBwIn0sImVtYWlsIjp7InRpdGxlIjoiRW1haWwifSwicHJpbnQiOnsidGl0bGUiOiJQcmludCJ9LCJ4LXR3aXR0ZXIiOnsidGl0bGUiOiJYIn0sInRocmVhZHMiOnsidGl0bGUiOiJUaHJlYWRzIn19LCJmYWNlYm9va19zZGsiOnsibGFuZyI6ImVuX1VTIiwiYXBwX2lkIjoiIn0sImxvdHRpZSI6eyJkZWZhdWx0QW5pbWF0aW9uVXJsIjoiaHR0cHM6XC9cL3d3dy5hcHJlbmRpemFydGlmaWNpYWwuY29tXC93cC1jb250ZW50XC9wbHVnaW5zXC9lbGVtZW50b3ItcHJvXC9tb2R1bGVzXC9sb3R0aWVcL2Fzc2V0c1wvYW5pbWF0aW9uc1wvZGVmYXVsdC5qc29uIn19OwovKiBdXT4gKi8K"></script><script defer type="text/javascript" src="https://www.aprendizartificial.com/wp-content/plugins/elementor-pro/assets/js/frontend.min.js?ver=3.23.3" id="elementor-pro-frontend-js"></script><script defer type='text/javascript' src='https://www.aprendizartificial.com/_jb_static/??aee954797e'></script><script defer id="elementor-frontend-js-before" src="data:text/javascript;base64,Ci8qIDwhW0NEQVRBWyAqLwp2YXIgZWxlbWVudG9yRnJvbnRlbmRDb25maWcgPSB7ImVudmlyb25tZW50TW9kZSI6eyJlZGl0IjpmYWxzZSwid3BQcmV2aWV3IjpmYWxzZSwiaXNTY3JpcHREZWJ1ZyI6ZmFsc2V9LCJpMThuIjp7InNoYXJlT25GYWNlYm9vayI6IlNoYXJlIG9uIEZhY2Vib29rIiwic2hhcmVPblR3aXR0ZXIiOiJTaGFyZSBvbiBUd2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24lMjBjb20lMjBzdHJpbmdzJTIwbXVsdGlsaW5oYXMiLCJleGNlcnB0IjoiXG5BcyBmLXN0cmluZ3MgY29tIHN0cmluZ3MgbXVsdGlsaW5oYSBzXHUwMGUzbyByZWN1cnNvcyBwb2Rlcm9zb3MgcGFyYSBmb3JtYXRhciB0ZXh0b3MgY29tcGxleG9zIGVtIFB5dGhvbiBlIGF1dG9tYXRpemFyIHZcdTAwZTFyaWFzIHRhcmVmYXMgZG8gc2V1IGRpYSBhIGRpYS5cbiIsImZlYXR1cmVkSW1hZ2UiOiJodHRwczpcL1wvd3d3LmFwcmVuZGl6YXJ0aWZpY2lhbC5jb21cL3dwLWNvbnRlbnRcL3VwbG9hZHNcLzIwMjRcLzA3XC9weXRob24tZW5jb2RlLmpwZyJ9fTsKLyogXV0+ICovCg=="></script><script defer type="text/javascript" src="https://www.aprendizartificial.com/wp-content/plugins/elementor/assets/js/frontend.min.js?ver=3.23.4" id="elementor-frontend-js"></script><script defer id="elementor-frontend-js-after" src="data:text/javascript;base64,Ci8qIDwhW0NEQVRBWyAqLwoidXNlIHN0cmljdCI7IWZ1bmN0aW9uKGUsdCl7ZSh0KS5vbigiZWxlbWVudG9yL2Zyb250ZW5kL2luaXQiLChmdW5jdGlvbigpe3ZhciB0LGk9ZWxlbWVudG9yTW9kdWxlcy5mcm9udGVuZC5oYW5kbGVycy5CYXNlO3Q9aS5leHRlbmQoe29uSW5pdDpmdW5jdGlvbigpe2kucHJvdG90eXBlLm9uSW5pdC5hcHBseSh0aGlzLGFyZ3VtZW50cyksdGhpcy5pc0hhcmFraXJpKCkmJih0aGlzLiRlbGVtZW50LmFkZENsYXNzKCJvYi1oYXJha2lyaSIpLCJjbGlwIj09PXRoaXMuZ2V0RWxlbWVudFNldHRpbmdzKCJfb2JfaGFyYWtpcmlfdGV4dF9jbGlwIikmJnRoaXMudXBkYXRlQ1NTKCJhZGQiKSl9LGlzSGFyYWtpcmk6ZnVuY3Rpb24oKXtyZXR1cm4ieWV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5fdXNlIik/dGhpcy4kZWxlbWVudC5hZGRDbGFzcygib2ItcG9zdG1hbiIpOnRoaXMuJGVsZW1lbnQucmVtb3ZlQ2xhc3MoIm9iLXBvc3RtYW4iKSl9fSk7dmFyIG89eyJ0aGVtZS1wb3N0LWNvbnRlbnQuZGVmYXVsdCI6dCwidGV4dC1lZGl0b3IuZGVmYXVsdCI6dH07ZS5lYWNoKG8sKGZ1bmN0aW9uKGUsdCl7ZWxlbWVudG9yRnJvbnRlbmQuaG9va3MuYWRkQWN0aW9uKCJmcm9udGVuZC9lbGVtZW50X3JlYWR5LyIrZSwoZnVuY3Rpb24oZSl7ZWxlbWVudG9yRnJvbnRlbmQuZWxlbWVudHNIYW5kbGVyLmFkZEhhbmRsZXIodCx7JGVsZW1lbnQ6ZX0pfSkpfSkpfSkpfShqUXVlcnksd2luZG93KTsKLyogXV0+ICovCg=="></script><script defer type="text/javascript" src="https://www.aprendizartificial.com/wp-content/plugins/elementor-pro/assets/js/elements-handlers.min.js?ver=3.23.3" id="pro-elements-handlers-js"></script><script defer id="wpr-addons-js-js-extra" src="data:text/javascript;base64,Ci8qIDwhW0NEQVRBWyAqLwp2YXIgV3ByQ29uZmlnID0geyJhamF4dXJsIjoiaHR0cHM6XC9cL3d3dy5hcHJlbmRpemFydGlmaWNpYWwuY29tXC93cC1hZG1pblwvYWRtaW4tYWpheC5waHAiLCJyZXN0dXJsIjoiaHR0cHM6XC9cL3d3dy5hcHJlbmRpemFydGlmaWNpYWwuY29tXC93cC1qc29uXC93cHJhZGRvbnNcL3YxIiwibm9uY2UiOiIwNjc1YTQ4YWRiIiwiYWRkZWRUb0NhcnRUZXh0Ijoid2FzIGFkZGVkIHRvIGNhcnQiLCJ2aWV3Q2FydCI6IlZpZXcgQ2FydCIsImNvbXBhcmVQYWdlSUQiOiIiLCJjb21wYXJlUGFnZVVSTCI6Imh0dHBzOlwvXC93d3cuYXByZW5kaXphcnRpZmljaWFsLmNvbVwvZi1zdHJpbmdzLWVtLXB5dGhvbi1jb20tc3RyaW5ncy1tdWx0aWxpbmhhc1wvIiwid2lzaGxpc3RQYWdlSUQiOiIiLCJ3aXNobGlzdFBhZ2VVUkwiOiJodHRwczpcL1wvd3d3LmFwcmVuZGl6YXJ0aWZpY2lhbC5jb21cL2Ytc3RyaW5ncy1lbS1weXRob24tY29tLXN0cmluZ3MtbXVsdGlsaW5oYXNcLyIsImNob29zZVF1YW50aXR5VGV4dCI6IlBsZWFzZSBzZWxlY3QgdGhlIHJlcXVpcmVkIG51bWJlciBvZiBpdGVtcy4iLCJzaXRlX2tleSI6IiIsImlzX2FkbWluIjoiIiwiaW5wdXRfZW1wdHkiOiJQbGVhc2UgZmlsbCBvdXQgdGhpcyBmaWVsZCIsInNlbGVjdF9lbXB0eSI6Ik5vdGhpbmcgc2VsZWN0ZWQiLCJmaWxlX2VtcHR5IjoiUGxlYXNlIHVwbG9hZCBhIGZpbGUiLCJyZWNhcHRjaGFfZXJyb3IiOiJSZWNhcHRjaGEgRXJyb3IiLCJ0b2tlbiI6ImJkNDEyOTQ5MGE3OThhZjY1NDI2MWU4NzBhM2FiNWNlMDMyZDcwMjYzMDM0YWRmY2FjYTg3MmQ1MjFmNTZkYjUifTsKLyogXV0+ICovCg=="></script><script defer type='text/javascript' src='https://www.aprendizartificial.com/_jb_static/??f78cd96f15'></script></body>
    # </html>
    

				
			

Assim, você personaliza eficientemente seus projetos e ganha tempo para se dedicar a outras atividades.

Formatação de Dados

Outro uso excelente de f-strings com strings multilinha é na formatação de grandes bancos de dados. A lógica é a mesma mostrada anteriormente.

				
					def formata_dados(dados):
    """Formata dados."""
    
    output = f"""
    Dados do Candidato:
    {'-' * 20}
    
    Nome: {dados['nome']}
    Idade: {dados['idade']}
    \n
    Linguagens de programação:
    {chr(10).join(chr(10)+f'    - {linguagem}' for linguagem in dados['linguagens'])}
    \n
    Empregos anteriores:
    {chr(10).join(chr(10)+f'    - {emprego}' for emprego in dados['empregos'])}
    \n
    Endereço:
     Rua: {dados['endereco']['rua']}
     Cidade: {dados['endereco']['cidade']}
    """
    return output

dados_candidato = {
    "nome": "Alfredo Silva",
    "idade": 30,
    "linguagens": ["Python", "JavaScript", "SQL"],
    "empregos": ["Sadia", "IBM", "Tech Ilimitada"],
    "endereco": {"rua": "Rua do Centro", "cidade": "Rio de Janeiro"}
}

print(formata_dados(dados_candidato))

# resultados

    # Dados do Candidato:
    # --------------------
    
    # Nome: Alfredo Silva
    # Idade: 30
    

    # Linguagens de programação:
    
    # - Python

    # - JavaScript

    # - SQL
    

    # Empregos anteriores:
    
    # - Sadia

    # - IBM

    # - Tech Ilimitada
    

    # Endereço:
    #  Rua: Rua do Centro
    #  Cidade: Rio de Janeiro
				
			

Viu como é fácil formatar textos e automatizar inúmeras tarefas sabendo apenas um pouco de Python? E essas são apenas algumas sugestões.

Encontrou algum erro ou quer fazer uma sugestão? Por favor, entre em contato usando nosso formulário de contatos.

Imagem com IA Generativa – Dia 274

IA generativa img 274

Arte com IA generativa: imagem do dia

Todos os dias, postamos um exemplo de imagem artística gerada com inteligência artificial.

Tutoriais

Postagens Mais Recentes

Outras Postagens Que Podem Interessar

Veja
Mais

Fique em contato

Se inscreva para receber nossa newsletter com novidades.

aprendiz artificial