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 get a random string from a list in Python
Python Online Editor
Execute Code
More Python Sample Codes
import random # to import random module str_list = ["apple", "banana", "mango", "orange"] # list of string random_str = random.choice(str_list) #use choice() function print(random_str)