Python Programming For Beginners: Crash Course (Java, Python, C++, R, C) (Programming, Java Programming, C++ Programming, Python Programming, R Programming, C Programming, Book 2) by Martin Laredo

Python Programming For Beginners: Crash Course (Java, Python, C++, R, C) (Programming, Java Programming, C++ Programming, Python Programming, R Programming, C Programming, Book 2) by Martin Laredo

Author:Martin Laredo
Language: eng
Format: azw3, epub
Publisher: Martin Laredo Publishing
Published: 2016-12-02T08:00:00+00:00


Print

I do not want to see brackets around everything when I am using a program. Instead, I would rather see a clean list so that I do not have to work at figuring out what the list says. To do this, I am going to use the join method.

Example

Example: 1recent_books = ['To Kill a Mockingbird', 'Slaughterhouse Five', 'East of Eden']

2print 'The three most recent books I’ve read are: %s.' % ', '.join(recent_books)

3# prints 'The three most recent books I’ve read are: To Kill a Mockingbird, Slaughterhouse Five, East of Eden.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.