πŸ“– Beginning Python Programming /
Module: List & Collection

Code Example: Random Quote

πŸ“– Beginning Python Programming / List & Collection / Code Example: Random Quote

Quotes Example v3

from random import randint


quotes = (
            ("I want to put a ding in the universe.", "Steve Jobs"),
            ("Life is 10% what happens to you and 90% how you react to it.", "Charles R. Swindoll"),
            ("Family is not an important thing. It's everything.", "Michael J. Fox"),
            ("Nothing is impossible, the word itself says 'I'm possible'!", "Audrey Hepburn"),
            ("There are two ways of spreading light: to be the candle or the mirror that reflects it.", "Edith Wharton"),
            ("Try to be a rainbow in someone's cloud.", "Maya Angelou"),
            ("Be brave enough to live life creatively. The creative place where no one else has ever been.", "Alan Alda"),
            ("The secret of getting ahead is getting started.", "Mark Twain"),
        )

quote = quotes[randint(0,len(quotes)-1)]

print("β€œ" + quote[0] + "” β€” " + quote[1])