โดย Four » 17/01/2018 4:35 pm
บทเรียน python บทที่ 6
https://www.youtube.com/watch?v=pZ788u6 ... lzdKrpxsMM
โค้ด: เลือกทั้งหมด
list1 = ["Mindphp", "test", 10, 20]
list2 = [10, 20, 30, 40]
print (len(list1))
print (len(list2))
print (list1 + list2)
print (list1 * 2)
print ("test" in list2)
for a in list1:
print (a)
ผลรัน
บทเรียน python บทที่ 6 https://www.youtube.com/watch?v=pZ788u6XsiM&index=6&list=PLLi1ciqQAf8TVFbJpl7XY23lzdKrpxsMM
[code]list1 = ["Mindphp", "test", 10, 20]
list2 = [10, 20, 30, 40]
print (len(list1))
print (len(list2))
print (list1 + list2)
print (list1 * 2)
print ("test" in list2)
for a in list1:
print (a)[/code]
ผลรัน
[img]http://snap.mindphp.com/index.php?view=2018Jan17_5a5f15b0b194a[/img]