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 list in Python
Python Online Editor
Execute Code
More Python Sample Codes
# Note: There is no built in array in Python # You can use list for an array print("There is no built in array in Python. You can use list for an array.\n") # Creating a list in one line fruits = ["Apple", "Banana", "Cherry", "Orange", "Watermelon"] # list of strings # Accessing an element in the list print(fruits[2]) # Output: Cherry # Creating a list of integers in one line numbers = [1, 2, 3, 4, 5] # list of integers # Accessing an element in the list print(numbers[2]) # Output: 3