import random print "English Premier League Table" print '' teams = ["Leicester City", "Arsenal", "Tottenham Hotspur", "Manchester City", "Manchester United", "Southampton", "West Ham United", "Liverpool", "Stoke City", "Chelsea", "Everton", "Swansea City", "Watford", "West Bromwich Albion", "Crystal Palace", "Bournemouth", "Sunderland", "Burnley", "Middlesbrough", "Hull City"] for i in range(20, 0 , -1): print str(21-i) + ') ' + teams.pop(random.randint(0, i-1)) leading_scorers = ["Harry Kane", "Jamie Vardy", "Sergio Aguero", "Romelu Lukaku", "Riyad Mahrez", "Olivier Giroud", "Odion Ighalo", "Alexis Sanchez", "Diego Costa", "Eden Hazard", "Zlatan Ibrahimovic"] print '' print "Leading scorer: " + leading_scorers.pop(random.randint(0, len(leading_scorers) - 1)) + ' - ' + str(random.randint(20, 30))
Run
Reset
Share
Import
Link
Embed
Language▼
English
中文
Python Fiddle
Python Cloud IDE
Follow @python_fiddle
Browser Version Not Supported
Due to Python Fiddle's reliance on advanced JavaScript techniques, older browsers might have problems running it correctly. Please download the latest version of your favourite browser.
Chrome 10+
Firefox 4+
Safari 5+
IE 10+
Let me try anyway!
url:
Go
Python Snippet
Stackoverflow Question