About
About Us
Help
Privacy Policy
Terms of Service
LearnDesk
Learn
Academics
Business
Creative
Health and Fitness
Lifestyle
Personal Development
Software
Topics
Admissions
Engineering
Hardware
Hospitality
Humanities
Chinese
Languages
Maths
Pharma
View All Topics
Topics
Accounting
Advertising
Analysis
Analytics
Business Communication
eCommerce
Entrepreneurship
Finance
Finance - India
Freelancing
View All Topics
Topics
Arts & Crafts
Audio Editing
Audio Production
Dance
Design
Film Production
Music
Photography
Video Production
Writing
View All Topics
Topics
Dieting
Fitness
Food Safety
Games
Medical
Medical Professionals
Meditation
Mental Health
Pregnancy
Safety & First Aid
View All Topics
Topics
Beauty & Makeup
Food
Fashion
Gaming
Home Improvement
Parenting
Pet Care & Training
Relationships
Sustainable Living
View All Topics
Topics
Career Development
Learning
Religion and Spirituality
Self-Improvement
View All Topics
Topics
Accounting
Amazon Web Services
App Development
Continuous Integration
Backup Software
Business Automation
Computational Fluid Dynamics
Business Intelligence
Computer Aided Design (CAD)
View All Topics
Teach
Teach Online
Schedule
Items
Billing
Users
Marketing
Analytics
Settings
Change School
Account
Log In
Sign Up
Python Programming Tutorial for the Absolute Beginner
Getting Started
Introducing Python
Preview
Installing Python on Windows
Preview
Meeting the Interpreter
Preview
Writing Your First Program
Preview
Employing Variables
Preview
Obtaining User Input
Preview
Correcting Errors
Preview
Summary
Preview
Performing Operations
Doing Arithmetic
Preview
Assigning Values
Preview
Comparing Values
Assessing Logic
Examining Conditions
Setting Precedence
Casting Data Types
Manipulating Bits
Summary
Making Statements
Writing Lists
Manipulating Lists
Restricting Lists
Associating List Elements
If Statement
While Loop
Looping Over Items
Breaking Out of Loops
Summary
Preview
Defining Functions
Understanding Scope
Supplying Arguments
Returning Values
Using Callbacks
Adding Placeholders
Producing Generators
Handling Exceptions
Debugging Assertions
Summary
Preview
Importing Modules
Storing Functions
Owning Function Names
Interrogating the System
Performing Mathematics
Calculating Decimals
Telling the Time
Running a Timer
Matching Patterns
Summary
Preview
Managing Strings
Manipulating Strings
Formatting Strings
Modifying Strings
Converting Strings
Accessing Files
Reading and Writing Files
Updating File Strings
Pickling Data
Summary
Preview
Programming Objects
Encapsulating Data
Creating Instance Objects
Addressing Class Attributes
Examining Built-in Attributes
Collecting Garbage
Inheriting Features
Overriding Base Methods
Harnessing Polymorphism
Summary
Preview
Processing Requests
Sending Responses
Handling Values
Submitting Forms
Providing Text Areas
Checking Boxes
Choosing Radio Buttons
Selecting Options
Uploading Files
Summary
Preview
Building Interfaces
Launching a Window
Responding to Buttons
Displaying Messages
Gathering Entries
Listing Options
Polling Radio Buttons
Checking Boxes
Adding Images
Summary
Preview
Summary
Python Programming Tutorial for the Absolute Beginner
Making Statements
By:
Elm.Benbihi
3 minutes
Share
Share the link to this page
Copied
Facebook
Twitter
WhatsApp
LinkedIn
Email
Add to Calendar
Add the class to your calendar
Add to Google Calendar
Add to Apple Calendar
Add to Yahoo Calendar
Add to Outlook Calendar
Print
Completed
In Python, multiple assignments can be used to initialize several variables in a single statement.
A Python list is a variable that can store multiple items of data in sequentially-numbered elements that start at zero.
Data stored in a list element can be referenced using the list name followed by an index number in [ ] square brackets.
The len() function returns the length of a specified list.
A Python tuple is an immutable list whose values can be assigned to individual variables by “sequence unpacking”.
Data stored in a tuple element can be referenced using the tuple name followed by an index number in [ ] square brackets.
A Python set is an unordered collection of unique elements whose values can be compared and manipulated by its methods.
Data stored in a set cannot be referenced by index number.
A Python dictionary is a list of key: value pairs of data in which each key must be unique.
Data stored in a dictionary element can be referenced using the dictionary name followed by its key in [ ] square brackets.
The Python if keyword performs a conditional test on expression for a Boolean value of True or False.
Conditional branching provides alternatives to an if test with the else and elif keywords.
A while loop repeats until a test expression returns False.
A for in loop iterates over each item in a specified list or string.
The range() function generates a numerical sequence that can be used to specify the length of a for-in loop.
The break and continue keywords interrupt loop iterations.
Previous
Next
Sign Up
Signup to access thousands of classes
Continue with Facebook
Continue with Google
OR
Continue with Email
Already a member?
Log In
By registering for a LearnDesk account, you agree to our
Terms of Service
and
Privacy Policy
.
Share
Share with friends, get 20% off
Invite your friends to LearnDesk learning marketplace. For each purchase they make, you get 20% off (upto $10) on your next purchase.
Share with Google Contacts