Python: print all the string from list at the same time
问题 For example, I have a list a . When I do it in a for loop, I can print all of its elements. But when I do it outside of the for loop, it only prints the last one. How can I print them all outside the for loop? Thanks in advance. Code: a=['a is apple','b is banana','c is cherry'] for i in a: print(i) print("====================") print(i) It prints: a is apple b is banana c is cherry ==================== c is cherry What I want for the result is: a is apple b is banana c is cherry ============