0
How to execute this example in console, or in One string, like lambda? Where I need to place x=x+1 to limite a loop?
x=1 m=[[1,2,3],[4,5,6],[7,8,9]] while x<10: print(list([r[2] for r in m])) x=x+1 #When I do it in console nothing is going. I guess it is necessary to relocate 'x=x+1'. I know that is easy, but I wonder because I've tried many ways...
7 odpowiedzi
+ 1
print(*[list([r[2] for r in m]) for i in range(10)], sep="\n")
https://code.sololearn.com/c287Pigt549T/?ref=app
+ 2
I tried but it is working
https://code.sololearn.com/cii5Op9cuNIY/?ref=app
+ 1
You are welcome.
Here are so more ways to use print() :
https://code.sololearn.com/cTiay1gR16w3/?ref=app
0
Gordon, then there is another question: how to write this function in one string, like lambda functions? For '>>>' executing in Pycharm, for example.
0
Gordon, it works. Thanks a lot! I went to learn a theory of Python :]
0
Dibrey, The C language is used usually for programming of hardware and embedded devices. You can read about "uses" on the Wikipedia.