t7=(3, 17, 34, 57)
t8=(5, 39, 57)
t9=(8, 16, 23, 45, 54, 58)
t10=(2, 20, 30)
t11=(3, 19, 34, 57)
t12=(8, 16, 27, 45, 54, 58)
t13=(3, 17, 34, 57)
t14=(2, 28, 30)
t15=(4, 17, 34, 57)
t16=(8, 16, 23, 45, 52, 58)
t17=(3, 17, 34, 57)
t18=(2, 20, 38)
t19=(3, 17, 32, 57)
times=(t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19)
There's a tuple like this (I'll call it a list for convenience), but if you print out the times, of course it's nested Nested list is t7, t8... If you can think of it as having a name like this
At this time
T=[7,34]
for i in range(len(times)):
# If T[0]-7 == i: No
# If T[0]==times[i]: I want to satisfy if in the same way
(That is, I want to satisfy if with t7==(t7 in column 0 which is the name of the overlapping list) What should I do when I do it?
list nested-list
The question is not clear, but it is possible to change the following.
t7=(3, 17, 34, 57)
t8=(5, 39, 57)
t9=(8, 16, 23, 45, 54, 58)
t10=(2, 20, 30)
t11=(3, 19, 34, 57)
t12=(8, 16, 27, 45, 54, 58)
t13=(3, 17, 34, 57)
t14=(2, 28, 30)
t15=(4, 17, 34, 57)
t16=(8, 16, 23, 45, 52, 58)
t17=(3, 17, 34, 57)
t18=(2, 20, 38)
t19=(3, 17, 32, 57)
times=(t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19)
for i, t in enumerate(times):
if t == t7:
print('%dth element of `times` list equals t7.'%i)
Results
0th element of `times` list equals t7.
6th element of `times` list equals t7.
10th element of `times` list equals t7.
572 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
581 PHP ssh2_scp_send fails to send files as intended
618 Uncaught (inpromise) Error on Electron: An object could not be cloned
915 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
© 2024 OneMinuteCode. All rights reserved.