[Python] Best method for Building Strings in Python [duplicate]

Discussão em 'Python' iniciado por Stack, Fevereiro 11, 2025.

  1. Stack

    Stack Membro Participativo

    Does Python have a function to neatly build a string that looks like this:

    Bob 100 Employee Hourly


    Without building a string like this:

    EmployeeName + ' ' + EmployeeNumber + ' ' + UserType + ' ' + SalaryType


    The function I'm looking for might be called a StringBuilder, and look something like this:

    stringbuilder(%s,%s,%s,%s, EmployeeName, EmployeeNumber, UserType, SalaryType, \n)

    Continue reading...

Compartilhe esta Página