BroHelp.me

Range to a list Python

list = list(range(1, 20))
print(list)

# output

# [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]



list = [*range(1, 20)]
print(list)

# output

# [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]

 

 

Random Articles

  • Range to a list Python
  • How to create brown color?
  • Find sum of elements in a given integer array in c
  • How much does a Shekel weigh?
  • What color is obtained if yellow and blue are mixed?
BroHelp is provided without warranty of any kind. If you found any problem please contact us at [email protected]
BroHelp.me 2020 - 2021