xFactorSchool.com(Beta)
How to Do Examples
Python Examples
HTML Examples
Code Examples
C Code Examples
C++ Code Examples
C# Code Examples
Java Code Examples
Python Code Examples
HTML Code Examples
CSS Code Examples
JavaScript Code Examples
Online Editor
C Code Editor
C++ Code Editor
C# Code Editor
Java Code Editor
Python Code Editor
HTML Code Editor
CSS Code Editor
JavaScript Code Editor
Practice how to create a tuple in Python
Python Online Editor
Execute Code
More Python Sample Codes
#you can create a tuple with mixed data type tuple_example = ("Apple", 465, "Cherry", 12.36) print("This is a tuple.") print(tuple_example) print("\nget the 2nd element of tuple.") #get 2nd element second_element = tuple_example[1] print(second_element) print("\nLoop through the tuple") # loop thought the tuple for item in tuple_example: print(item )