Pacific-Design.com

    
Home Index

1. Python

2. Array

Python / Array /

Random Array Element

#!/usr/bin/env python
import random

array = []
array.append("audi")
array.append("mercedes")
array.append("bmw")
array.append("lamborhini")
term = random.choice(array)

print(term)