xFactorSchool.com
Python
JavaScript
How to Do Examples
C 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 Compilers
C Compiler
C++ Compiler
C# Compiler
Java Compiler
Python Compiler
HTML Code Editor
CSS Code Editor
JavaScript Compiler
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)