+ 2
Unpacking in python
If I have a dictionary that contains the following items Dictionary = {'A': ['0','1','2','3','4','5','6','7','8']} How do I unpack it and print it as follow? A 0 1 2 3 4 5 6 7 8 I cannot find any attempts on this question
2 Réponses
+ 4
for i in range(0, 9, 3):
print(*Dictionary['A'][i:i+3])
+ 1
You're really good at this! I understand this method thank you so much!