Range class in Python -


if have lst2 = [11,22,33,44,55,66,77] , want 3 middle elements new list. how can proceed?

i unsure on how can them add +1 each. example:

for in range(1,100,10)     print(i) 

this give me list [1,11,21,31,41,51...], when in want of list go more like: [11,22,33,44...].

stop = 100 result = []  in range(11,stop, 10):   result.append(i)  print(result) 

https://repl.it/kr6p


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -