Hello, I'm a newbie who just started.
When you receive two-dimensional array input, you are taught to do the following.
I am familiar with the contents of the append, list, map, int, input, and split functions below. No matter how hard I think about it, I don't understand that the output value comes out pretty in the overlapping list.
It's a very basic question. It's funny, but... I might be pretty serious.
With the code below, the two-dimensional array goes into the overlapping list beautifully. Can you elaborate on that way?
mylist = []
for i in range(3) :
mylist.append(list(map(int, input('').split())))
print(mylist)
mylist = []
for i in range(3) :
a = input('')
print(a)
a = a.split()
print(a)
a = map(int, a)
print(a)
a = list(a)
print(a)
print(mylist)
mylist.append(a)
print(mylist)
© 2024 OneMinuteCode. All rights reserved.