Basic topics in python for beginners

in this article, I would tell you how you can start with learning python if you want to be a python developer
I will list all the topics we will learn in python

Datatypes

datatypes are very important in any programing language we have the following datatypes

Text

stringstring is a text representation in python

Numeric

integerinteger is a numeric representation of an integer (1,10,135)

floatfloat is also a numeric representation but it’s different it includes real numbers or in simple language, if the number has a decimal point it is considered as a float (54.6,62.379,10.0)

Sequence Datatypes

list — the list is a 1-dimensional array that can store multiple values at a time and list is mutable, it can be changed in the future a list is created by [‘a’,’b’, ‘c’]

tuple tuple is very similar to a list but it is immutable, we cannot change the tuple or the items present in a tuple in future once it’s created it is created by {‘a’,’b’, ‘c’}

set sets are used to store multiple items in the same variable i.e.
if a set have these elements 1,2,3,2,1,2,1 when we create a set it will show us 1,2,3

Conditional statements

conditional statements to perform a particular task if any value goes true there are 3 conditional statements if, else,elif

if — it has a code of body that runs only if the condition of the if command come to true

else else runs a body command if the condition is not satisfied by if and elif

Elif — The Elif keyword is used in conditional statements (if statements), and is short for else if. similar to if the command

Loops

a loop runs a code after and after until its condition comes out to be false
there are 2 types of loops in python for and while loop

for — A for loop is used for iterating over a sequence (that is either a list, a tuple, a dictionary, a set, or a string).

while — In python, a while loop is used to execute a block of statements repeatedly until a given condition is satisfied. And when the condition becomes false, the line immediately after the loop in the program is executed.

Functions

A function is a block of code that only runs when it is called.
You can pass data, known as parameters, into a function.
A function can return data as a result. it can be created by def

--

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Simple Camera Shake when the Player Takes Damage!

Configuring Default Notification Handler in WSO2 Identity Server to send Emails and SMSes

Upgrading A Unity Project To URP

Why there are no “true” free trials

Integration Partner Highlight: M2M In Motion ELD

My coding journey: pairing, mobbing and 12 lines of Ruby!

Python Coding Best Practices

How to Deploy a Gatsby Site to an S3 Bucket

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Aviral Bhardwaj

Aviral Bhardwaj

writer

More from Medium

Building and Deploying a Flask REST API on Heroku(Part 2)

Hello World in Python

LEARNING PYTHON -Static Data & Operators

Python Programming for Beginners Part -14