Python map

Asked 2 years ago, Updated 2 years ago, 89 views

What's the function of map in Python? ex) It says map[x][y+1] but I don't know what it means

python map

2022-09-22 19:37

1 Answers

>>> m = {'x':[1,2,3,4,5]}
>>> m
{'x': [1, 2, 3, 4, 5]}
>>> m['x'][1]
2

As shown above, a list or tuple is specified as an element of the map.


2022-09-22 19:37

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.