Loading...
「ツール」は右上に移動しました。
利用したサーバー: wtserver1
19いいね 172 views回再生

Lecture 5: Python Datatypes: Primitive and Non Primitive, int, float, string, list | Project Guru

Python Programming - From Basics to Advanced level 2023 | Python for Beginners | Python full course in Hindi | The Complete Python Programming Course: Beginner to Advanced | Python Programming Full Course (Basics + Advanced) | Python 3: From Beginner to Advanced | Python For Beginner and Intermediate Learners | Everything About Python — Beginner To Advanced | How to learn Python from a beginner level | Python Tutorial for Beginners: Learn Programming Basics | Learn Python - Free Interactive Python Tutorial | Learn Python Programming | The ultimate introduction to Python in 2023 | Python Full Course for free | Python Tutorial For Beginners In Hindi (With Notes) 2023 | Python Tutorials For Absolute Beginners In Hindi | Python Tutorial - Python Full Course for Beginners | Learn Python - Full Course for Beginners Tutorial

Python Data Types
Variables can hold values, and every value has a data-type. Python is a dynamically typed language; hence we do not need to define the type of the variable while declaring it. The interpreter implicitly binds the value with its type.

Standard data types
A variable can hold different types of values. For example, a person's name must be stored as a string whereas its id must be stored as an integer.s
Python provides various standard data types that define the storage method on each of them. The data types defined in Python are given below.
The following example illustrates the string in Python.
Numbers
Sequence Type
Boolean
Set
Dictionary

Download the Notes for Python Basics to Advance series Lecture 5
Before proceeding ahead, please download lecture 5 notes using the link:- https://drive.google.com/drive/folder...

Numbers
Number stores numeric values. The integer, float, and complex values belong to a Python Numbers data-type. Python supports three types of numeric data.
Int - Integer value can be any length such as integers 10, 2, 29, -20, -150 etc. Python has no restriction on the length of an integer.
Float - Float is used to store floating-point numbers like 1.9, 9.902, 15.2, etc. It is accurate upto 15 decimal points.
complex - A complex number contains an ordered pair, i.e., x + iy where x and y denote the real and imaginary parts, respectively. The complex numbers like 2.14j, 2.0 + 2.3j, etc.

Sequence Type
String
The string can be defined as the sequence of characters represented in the quotation marks. In Python, we can use single, double, or triple quotes to define a string.
In the case of string handling, the operator + is used to concatenate two strings as the operation "hello"+" python" returns "hello python". The operator * is known as a repetition operator as the operation "Python" *2 returns 'Python Python'.

List
Python Lists are similar to arrays in C. However, the list can contain data of different types. The items stored in the list are separated with a comma (,) and enclosed within square brackets []. We can use slice [:] operators to access the data of the list. The concatenation operator (+) and repetition operator (*) works with the list in the same way as they were working with the strings.

Tuple
A tuple is similar to the list in many ways. Like lists, tuples also contain the collection of the items of different data types. The items of the tuple are separated with a comma (,) and enclosed in parentheses (). A tuple is a read-only data structure as we can't modify the size and value of the items of a tuple.

Dictionary
Dictionary is an unordered set of a key-value pair of items. Key can hold any primitive data type, whereas value is an arbitrary Python object. The items in the dictionary are separated with the comma (,) and enclosed in the curly braces {}.

Boolean
Boolean type provides two built-in values, True and False. These values are used to determine the given statement true or false.

Set
Python Set is the unordered collection of the data type. It is iterable, mutable(can modify after creation), and has unique elements. In set, the order of the elements is undefined; it may return the changed sequence of the element. The set is created by using a built-in function set(), or a sequence of elements is passed in the curly braces and separated by the comma.

Python Basic to Advance Full Playlist:-    • Lecture 1: Introduction to Python | Python...  

___________________________________________________________________________________
Connect with me:
Facebook:-   / ak.kmr  
Instagram:-   / ak.kmr111  
Email:- akshaydhiman685@gmail.com
___________________________________________________________________________________
Subscribe:-    / @project_guru  

#python #pythontutorial #basictoadvance #projectguru #pythonprogramming #apnacollege #codewithharry #intellipaat #python3 #pythonforbeginners #pythonbeginner

コメント