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 an efficient way to create the list [0, 2, 3, ..., 234] in python? [closed]

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

  1. Stack

    Stack Membro Participativo

    I want to create the list [0, 2, 3, ..., 234] in python, possibly within a row and without listing all numbers explicitly

    I know that following code works:

    list1 = [0]
    for i in range(2,235):
    list1.append(i)


    But are there any possibilities to finish that within a row?

    Continue reading...

Compartilhe esta Página