[Python] Getting the length of a list when it has one element

Discussão em 'Python' iniciado por Stack, Junho 14, 2025.

  1. Stack

    Stack Membro Participativo

    I have a list that only contains one string element. If I use

    len(list)


    it will return the amount of characters instead of the value 1. How can I make it to return the value 1?

    Continue reading...

Compartilhe esta Página