What are the different types of data types one can use in Python?

0 votes
Which data types, variables, literals are the most likely to be used in Python scripting language?
May 27 in Python by Matilda
• 220 points
29 views

1 answer to this question.

0 votes

Python provides an array of built-in constants, data types, variables, functions, and exceptions for customizable use. Few of the most widely used datatypes are given below:

  1. Boolean operators - Used for comparing data. Literals used - 'and', 'or', 'not'
  2. Numeric datatype - Used for defining numerical data types. Literals used - 'int', 'float', 'complex'
  3. Sequence datatype - Used to define and perform operations on a collection data type variable. Literals used - 'list', 'tuple', 'range'
  4. Text sequence datatype - Used to define and utilize character arrays in a program. Literal used - 'str'
  5. Mapping datatype - Used for defining a dictionary with words and meanings attached to the words. Literal used - 'dict'

Few of the most usually used functions that are used in Python 3 are given below:

  1. input() - Used to accept an input from the user
  2. len() - Used to find the length of a array or string variable
  3. set() - Creates a set (unstructured collection of items)
  4. max() and min() - Used to find the maximum and minimum length of a string, array or a sequence data variable.
For more information, go through the references below:
  1. https://www.edureka.co/blog/variables-and-data-types-in-python/
  2. https://www.edureka.co/blog/python-tutorial/
  3. https://www.edureka.co/blog/python-programming-language
answered May 28 by Harsh
• 260 points

Related Questions In Python

0 votes
2 answers

What are the types of dictionary in python?

There are 4 types of dictionary Empty Integer Mixed Dictionary with ...READ MORE

answered Feb 14 in Python by Shashank
• 1,350 points
59 views
0 votes
1 answer
+2 votes
3 answers

what is the practical use of polymorphism in Python?

Polymorphism is the ability to present the ...READ MORE

answered Mar 31, 2018 in Python by anto.trigg4
• 3,420 points
1,566 views
0 votes
1 answer

What is the use of raw_input function in Python?

raw_input fuction is no longer available in ...READ MORE

answered May 2, 2018 in Python by aayushi
• 750 points
115 views
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 6 in Python by Neha
• 330 points

edited Jul 8 by Kalgi 329 views
0 votes
1 answer

What are the best IDE/platform to write code in Python

Just as any other programming language, even ...READ MORE

answered May 28 in Python by Harsh
• 260 points
47 views
0 votes
1 answer

What are the features of Python 3?

Python 3 offers rich functionality making it ...READ MORE

answered May 28 in Python by Harsh
• 260 points
35 views