100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Summary

Summary Quick Reference Of Python Programming Language

Rating
-
Sold
-
Pages
18
Uploaded on
21-09-2021
Written in
2021/2022

Learning a programming language is needed a great effort, isn't it? But, after learning the language we can't remember all of the keywords, syntaxes, datatypes of that language. As python is one of the most popular programming languages at this time, and it's being a necessity for all programmers to learn python. But, after learning the language when we start coding, it will be great if we have a quick reference or cheat sheet in front of our eyes, where all syntaxes will be present. Isn't it sound good! In this python quick reference note, you'll get all the important syntaxes handy whenever you'll code.

Show more Read less
Institution
Course










Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Course

Document information

Uploaded on
September 21, 2021
Number of pages
18
Written in
2021/2022
Type
Summary

Subjects

Content preview

Quick Reference

,1. Basics
Basic syntax from the python programming language

Showing Output To User

the print function is used to display or print output


print("Content that you wanna print on screen")


Taking Input From User

the input function is used to take input from the user


var1 = input("Enter your name: ")


Empty List

This method allows you to create an empty list


my_list = []


Empty Dictionary

By putting two curly braces, you can create a blank dictionary


my_dict = {}


Range Function

range function returns a sequence of numbers, eg, numbers starting from 0 to n-1 for range(0, n)


range(int_value)




2. Comments
Comments are used to make the code more understandable for programmers, and they are not
executed by compiler or interpreter.
1/17

, Single line comment


#This is a single line comment


Multi-line comment


'''This is a
multi-line
comment'''



3. Escape Sequence
An escape sequence is a sequence of characters; it doesn't represent itself when used inside
string literal or character.

Newline

Newline Character


\n


Backslash

It adds a backslash


\\


Single Quote

It adds a single quotation mark


\'


Tab

It gives a tab space


\t



2/17
$2.99
Get access to the full document:

100% satisfaction guarantee
Immediately available after payment
Both online and in PDF
No strings attached

Get to know the seller
Seller avatar
learnwithsouvik

Get to know the seller

Seller avatar
learnwithsouvik University of Calcutta
Follow You need to be logged in order to follow users or courses
Sold
0
Member since
4 year
Number of followers
0
Documents
2
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions