1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[Python] What is the most efficient string concatenation method in Python?

Discussão em 'Python' iniciado por Stack, Setembro 23, 2024.

  1. Stack

    Stack Membro Participativo

    Is there an efficient mass string concatenation method in Python (like StringBuilder in C# or StringBuffer in Java)?

    I found following methods here:

    • Simple concatenation using +
    • Using a string list and the join method
    • Using UserString from the MutableString module
    • Using a character array and the array module
    • Using cStringIO from the StringIO module

    What should be used and why?

    (A related question is here.)

    Continue reading...

Compartilhe esta Página