Python fundamentals - Data types and In-built Objects

In previous section we installed python and run hello world program. Now we will delve into building block of python language and will write sample program to understand the same.
As we know that python is both procedural and object oriented language. We will focus on Object oriented aspect of python.
Python is an object-oriented language and classes form the basis for all data types. Python has various built-In Classes like int for integers , float for floating point values and str for character string. i,e: Every thing in Python is class, even primitive data type.
Consider following statement in python :
    student_cgp  =  7.65
How do we interpret this in python - student_cgp is an identifier and it references a floating point object with value 7.65. Two important point need to be noted here is :
1. Identifiers in python are case-sensitive.In Python, identifier is similar to a reference variable in Java or a pointer variable in C++. Each identifier is implicitly associated with the memory address of the object to which it refers.
2. Unlike Java and C++, python is a dynamically typed language, there is no advance declaration associating an identifier with a particular data type. Although an identifier has no declared type, the object to which it refers has a definite type.
Below is the list of built in class in python. It can be classified broadly mutable and immutable classes. Object of immutable classes cannot be changed subsequently once it has been instantiated.
Commonly used built-in classes for Python
Note : 
1. Bool class instances are expressed as the literals True and False.
2. Numbers are mainly of two types - integers and floats. In Python, int and float classes are the primary numeric types. Default value from constructor int() is 0 and float() is 0.0.
3. In Java and c++, we have different int type based on precision. However,python automatically chooses the internal representation for an integer based upon the magnitude of its value.

Before moving ahead we will execute some code in python interpreter and predict outcome:
    >>> int(3.14)
    3
    >>> int(-3.99)
    -3
    >>> int('137')
    137

Operators in python:- 

Almost all operators are present in Python as in other languages, some of them needs special mention are as follows :

Comments in python:-

In python single line comment is done using # (pound).Below code uses # for comment: 
 # I am comment- it will print Hello World
  >>>print 'hello world'
  hello world
Note:  It is recommended not to use triple-quotes for block comments as it is for documentation strings not block comments, although it has a similar effect.Always use # in for single or multiple statements. 


Previous : Introduction and installation                                 Next: Python Control Flow (If-Else, While, For Loop)

124 Comments

  1. This comment has been removed by the author.

    ReplyDelete
  2. I am commenting to let you know what a terrific experience my daughter enjoyed reading through your web page. She noticed a wide variety of pieces, with the inclusion of what it is like to have an awesome helping style to have the rest without hassle grasp some grueling matters.
    Surya Informatics

    ReplyDelete
  3. Excellent blog with lots of information. I have to thank for this. Do share more.

    Tally Course | Tally Institute

    ReplyDelete
  4. You are doing a great job by sharing useful information about Python Programming course. It is one of the post to read and imporove my knowledge in Python Programming .You can check our Comments In Python language,for more information about Python Comments Tutorial.

    ReplyDelete
  5. Best Realtor in Brampton
    We will help you in highly profitable insvestment in which you will let your hard earned money delivers you the best highest return on the investments.

    ReplyDelete
  6. thanks for sharing this is really helpful for my upcoming project

    ReplyDelete
  7. This is an excellent article. Thanks for sharing this information. I will be visiting your blog regularly for the latest articles. I will be visiting your blog regularly to see some of the latest posts.

    Data Science Certification

    ReplyDelete
  8. I am very enjoying to read your well-written article posts. It seems that you devote a great deal of hard work and time onto your own blog. typeerror nonetype object is not subscriptable

    ReplyDelete
  9. Speaking honestly this blog is absolutely amazing in learning the subject that is building up the knowledge of every individual and enlarging to develop the skills which can be applied in to practical one. Finally, thanking the blogger to launch more further too.

    Data Science training in Bhilai

    ReplyDelete
  10. I am here for the first time. I found this table and found it really useful and it helped me a lot. I hope to present something again and help others as you have helped me. PMP Certification in Hyderabad

    ReplyDelete
  11. Impressive blog to be honest definitely this post will inspire many more upcoming aspirants. Eventually, this makes the participants to experience and innovate themselves through knowledge wise by visiting this kind of a blog. Once again excellent job keep inspiring with your cool stuff.

    Digital Marketing training

    ReplyDelete
  12. A decent blog dependably concocts new and energizing data and keeping in mind that understanding I have feel that this blog is truly have each one of those quality that qualify a blog to be a one. 토토사이트

    ReplyDelete
  13. I gotta favorite this website it seems very helpful . 토토사이트

    ReplyDelete
  14. This is such a great resource that you are providing and you give it away for free. I love seeing blog that understand the value of providing a quality resource for free. SprinJene

    ReplyDelete
  15. I want you to thank for your time of this wonderful read !!! I definately enjoy every little bit of it and I have you bookmarked to check out new stuff of your blog a must read blog windshield replacement san diego

    ReplyDelete
  16. This article was written by a real thinking writer.I agree many of the with the solid points made by the writer. dental veneers tijuana

    ReplyDelete
  17. Excellent article. Very interesting to read. I really love to read such a nice article. Thanks! keep rocking. used motorcycles san diego

    ReplyDelete
  18. Trying to say thanks won't simply be adequate, for the fantasti c clarity in your written work. I will immediately snatch your rss channel to remain educated of any updates ktm motorcycles

    ReplyDelete
  19. Trying to say thanks won't simply be adequate, for the fantasti c clarity in your written work. I will immediately snatch your rss channel to remain educated of any updates diseño grafico tijuana

    ReplyDelete
  20. Superb article. Thanks to this blog my expedition has actually ended best natural toothpaste for toddlers

    ReplyDelete
  21. This is also a very good post which I really enjoy reading. It is not everyday that I have the possibility to see something like this real estate broker West Carleton

    ReplyDelete
  22. The article posted was very informative and useful. You people are doing a great job. Keep going courtier immobilier West Carleton

    ReplyDelete
  23. Admiring the time and effort you put into your blog and detailed information you offer! cybersécurité

    ReplyDelete
  24. This site is excellent and so is how the subject matter was explained. I also like some of the comments too. Looking forward to your next post. patio

    ReplyDelete
  25. It is great, yet take a gander at the data at this address. yoga gatineau

    ReplyDelete
  26. Hello First time I visite your website. I read some posts I got some good information from your posts. I got quality of work from your website. Now I'm your permanent user many Thanks for your writing freelancer malta

    ReplyDelete
  27. Very useful post. This is my first time i visit here. I found so many interesting stuff in your blog especially its discussion. Really its great article. Keep it up Bioclimatic Pergola Skylounge

    ReplyDelete
  28. You possess lifted an essential offspring..Blesss for using..I would want to study better latest transactions from this blog..preserve posting. shipping from china

    ReplyDelete
  29. Thank you for helping people get the information they need. Great stuff as usual. Keep up the great work corporate video production company in Baltimore

    ReplyDelete
  30. " '훌륭한 유용한 리소스를 무료로 제공하는 가격을 알 수있는 웹 사이트를 보는 것이 좋습니다. 귀하의 게시물을 읽는 것이 정말 마음에 들었습니다. 감사합니다! 훌륭한 읽기, 긍정적 인 사이트,이 게시물에 대한 정보를 어디서 얻었습니까? 지금 귀하의 웹 사이트에서 몇 가지 기사를 읽었으며 귀하의 스타일이 정말 마음에 듭니다. 백만명에게 감사하고 효과적인 작업을 계속하십시오. 출장

    ReplyDelete
  31. You have a good point here!I totally agree with what you have said!!Thanks for sharing your views...hope more people will read this article!! 메이저사이트

    ReplyDelete
  32. I read this article. I think You put a great deal of exertion to make this article. I like your work... real estate broker vanier

    ReplyDelete
  33. The Data Scientist Certification Programme is one of the most comprehensive Data Science Course in Bangalore. It is specially designed to suit both data professionals and beginners who want to make a career in this fast-growing profession. Over 6 months, students will learn key techniques such as Statistical Analysis, Regression Analysis, Data Mining, Machine Learning, Forecasting and Text Mining, and tools such as Python and R Programming.

    ReplyDelete
  34. Your content is very unique and understandable useful for the readers keep update more article like this.
    data science certification in noida

    ReplyDelete
  35. When i expanded your website, I liked it a lot because it has a lot of useful information.My company provide quality packaging boxes in the United Kingdom.My boxes are available in all shapes and sizes.If anyone is interested in buying boxes,visit my Looking For Custom Packing Solutions?
    .
    Thank You!

    ReplyDelete
  36. That is a very good tip especially to those new to the blogosphere.
    Short but very accurate info… Appreciate
    your sharing this one. A must read post경기오피

    ReplyDelete
  37. What is a blogging site where people give a lot of quick feedback?해외선물대여계좌

    ReplyDelete
  38. From this post I know that your good knowledge of the game with all the pieces has been very helpful. I inform you that this is the first place where I find problems that I look for. You have a clever but attractive way of writing.
    Digital Marketing Course in Bangalore

    ReplyDelete
  39. UAE non commercial cleaning assistance dubai have been helping occupied people just like you for over 3 years. We realize every individual and household has distinct needs that´s precisely why we provide the flexibility for you to book each of our "complete cleanup package" as well as "customize" it available for you. Below is surely an outline of our own complete non commercial cleaning dubai plans. cleaning services dubai

    ReplyDelete
  40. Happy to chat on your blog, I feel like I can't wait to read more reliable posts and think we all want to thank many blog posts to share with us.
    Business Analytics Course

    ReplyDelete
  41. First of all, you have a great blog. I will be interested in more similar topics. I see you have some very useful topics, I will always check your blog thank you.
    Best Data Science Courses in Bangalore

    ReplyDelete
  42. You have shared a nice article here about the programming sites. Your article is very informative and useful for those who are looking for the best sites for develop website. Thank you for sharing this article here.
    white label website builder

    ReplyDelete
  43. https://www.digitpro.co.uk/marketing-and-advertising-services/ nice article

    ReplyDelete
  44. Really Nice Information It's Very Helpful All courses Checkout Here.
    data science course aurangabad

    ReplyDelete
  45. This was an extremely nice post. Taking a few minutes and카지노사이트 actual effort to generate a top notch article.

    ReplyDelete
  46. Excellent Blog! I would like to thank토토사이트 you for the efforts you have made in writing this post.

    ReplyDelete
  47. I wanted to leave a little comment to support you and wish you the best of luck. We wish you the best of luck in all of your blogging endeavors.

    Digital Marketing Course in Bangalore

    ReplyDelete
  48. I'm looking for and I like to post a comment that says "The content of your post is amazing" Great job!

    Best Data Science Courses in Bangalore

    ReplyDelete
  49. Thanks to my father who shared with me regarding this web site, this weblog
    is actually amazing.
    click me here온라인바카라

    yang

    ReplyDelete
  50. While looking for articles on these topics, I came across this article on the site here. As I read your article, I felt like an expert in this field. I have several articles on these topics posted on my site. Could you please visit my homepage? 토토사이트모음


    ReplyDelete
  51. Hello, I read the post well. 메이저토토 It's a really interesting topic and it has helped me a lot. In fact, I also run a website with similar content to your posting. Please visit once


    ReplyDelete
  52. I'm so happy to finally find a post with what I want. 메이저토토사이트 You have inspired me a lot. If you are satisfied, please visit my website and leave your feedback.


    ReplyDelete
  53. Succeed! It could be one of the most useful blogs we have ever come across on the subject. Excellent info! I’m also an expert in this topic so I can understand your effort very well. Thanks for the huge help. 먹튀검증사이트


    ReplyDelete
  54. Hello, I'm happy to see some great articles on your site. Would you like to come to my site later? My site also has posts, comments and communities similar to yours. Please visit and take a look 토토사이트


    ReplyDelete
  55. Excellent read, I just passed this onto a friend who was doing a little research on that. And he actually bought me lunch as I found it for him smile Therefore let me rephrase that: Thank you for lunch. 메이저사이트


    ReplyDelete
  56. I finally found what I was looking for! I'm so happy. 안전한놀이터 Your article is what I've been looking for for a long time. I'm happy to find you like this. Could you visit my website if you have time? I'm sure you'll find a post of interest that you'll find interesting.


    ReplyDelete
  57. Many thanks for the article, I have a lot of spray lining knowledge but always learn something new. Keep up the good work and thank you again. 먹튀사이트


    ReplyDelete
  58. Your internet site really feels a great deal of specialist touch. I'm still an amateur, so I intend to speak to a professional. My writing is still unsatisfactory, yet I desire you to evaluate me by my writing. Please do that for us. win at online slots

    ReplyDelete
  59. Youre so right. Im there with you. Your weblog is definitely worth a read if anyone comes throughout it. Im lucky I did because now Ive received a whole new view of this. 메이저사이트추천


    ReplyDelete
  60. I figure this article can be enhanced a tad. There are a couple of things that are dangerous here, and if you somehow managed to change these things, this article could wind up a standout amongst your best ones. I have a few thoughts with respect to how you can change these things. 메이저놀이터


    ReplyDelete
  61. Awesome article! I want people to know just how good this information is in your article. It’s interesting, compelling content. Your views are much like my own concerning this subject 먹튀검증 It touched me a lot. I would love to hear your opinion on my site. Please come to the site I run once and leave a comment. Thank you.


    ReplyDelete
  62. Thanks for the blog filled with so many information. Stopping by your blog helped me to get what I was looking for. Now my task has become as easy as ABC. 안전놀이터


    ReplyDelete
  63. Thanks for an interesting blog. What else may I get that sort of info written in such a perfect approach? I have an undertaking that I am just now operating on, and I have been on the lookout for such info 먹튀검증 It's amazing. I want to learn your writing skills. In fact, I also have a website. If you are okay, please visit once and leave your opinion. Thank you.


    ReplyDelete
  64. Your skill is great. I am so grateful that I am able to do a lot of work thanks to your technology.메이저사이트 I hope you keep improving this technology.


    ReplyDelete
  65. Thank you so much for such a well-written article. It’s full of insightful information. Your point of view is the best among many without fail.For certain, It is one of the best blogs in my opinion. 먹튀검증


    ReplyDelete
  66. You make so many great points here that I read your article a couple of times. Your views are in accordance with my own for the most part. This is great content for your readers. 안전놀이터


    ReplyDelete
  67. I think this is a wonderful blog! I love reading it and all of the information here has helped me in my business, thank you for writing.
    Machine Learning Training in Hyderabad
    Machine Learning Course in Hyderabad

    ReplyDelete
  68. 메이저사이트Nov 22, 2021, 12:37:00 AM

    It has a good meaning. If you always live positively, someday good things will happen. 메이저사이트Let's believe in the power of positivity. Have a nice day.


    ReplyDelete
  69. This post is so helpfull and informative.Keep updating with more information...
    IELTS Test British Council
    IELTS Full Course

    ReplyDelete
  70. From some point on, I am preparing to build my site while browsing various sites. It is now somewhat completed. If you are interested, please come to play with 토토사이트!!


    ReplyDelete
  71. Very nice post thank you for sharing this post its very knowledgeable and very helpful i hope that you will continue to post these kinds of contents in future apart from that if anyone looking for AutoCAD institute in delhi so check out this Contact Here-+91-9311002620 Or Visit Website- https://www.htsindia.com/AutoCAD-training-courses

    ReplyDelete
  72. Great post! I am truly on the point of throughout this records, Chatroulette

    ReplyDelete
  73. A properly weblog continually comes-up with new and interesting statistics. ome.tv

    ReplyDelete
  74. Thank you for the information. Please keep posting.

    Data Analytics Solutions

    ReplyDelete
  75. You have completed certain reliable points there. I did some research on the subject and found that almost everyone will agree with your blog.

    Best IoT Training Institute in Bangalore

    ReplyDelete
  76. I have recently started a blog, the info you provide on this site has helped me greatly. Thanks for all of your time & work. ויזה דחופה להודו

    ReplyDelete
  77. 메이저추천 스포츠중계 메이저사이트목록 Anleitung und Erklärung

    ReplyDelete

  78. It's like you've got the point right, but forgot to include your readers. Maybe you should think about it from different angles.
    Data Analytics Bangalore

    ReplyDelete
  79. I'm always looking online for articles that can help me. I think you also made some good comments on the functions. Keep up the good work!

    Data Scientist Training and Placement Bangalore

    ReplyDelete
  80. Very awesome!!! When I seek for this I found this website at the top of all blogs in search engine. Data Scientist Course in Vadodara

    ReplyDelete
  81. This post is very simple to read and appreciate without leaving any details out. Great work!
    data science training in aurangabad

    ReplyDelete
  82. Extremely helpful post. This is my first time I visit here. I found so many fascinating stuff with regards to your blog particularly its conversation. Actually its extraordinary article. Keep it up
    buy 25 instagram likes

    ReplyDelete
  83. This is a great inspiring blog. You have shared really very helpful information thank you.
    Data Scientist Course in Amritsar

    ReplyDelete
  84. A touch board configuration is just a graphical connection point that discussions to mechanization hardware, it fuses pictures, text, fastens or in any event, moving pictures and transferred video.Yealink A20 Meetingbar
    Yealink A20

    ReplyDelete
  85. 360DigiTMG is the top-ranked and the best Data Science Course Training Institute in Hyderabad.

    ReplyDelete
  86. Machine learning is the core part of AI. Machines are trained to perform actions automatically like the friend suggestion on Facebook, the recommendations about a particular product on amazon. It has also proved its worth in fraud detection. In this article, you will read the importance of machine learning for a data scientist. 360DigiTMG provides exceptional training in the Data Science course with placements. Learn the strategies and techniques from the best industry experts and kick start your career. Get dual certification from IBM and UTM Malaysia with the 360DigiTMG Data Science Certification program. In this article, you will read the basic details of both of these languages, and then it will be easy for you to make a decision that is R is easier to learn than Python. But learning R is difficult than learning Pythons because R is not in English-like statements, so the aspirants need to know it more deeply to have a grip on the language.business analytics course in jalandhar

    ReplyDelete
  87. Learn to use analytics tools and techniques to manage and analyze large sets of data from Data Science training institutes in Bangalore. Learn to take on business challenges and solve problems by uncovering valuable insights from data. Learn from the comprehensively designed curriculum by the industry experts and work on live projects to sharpen your skills.
    Data Science Certification in Bangalore

    ReplyDelete
  88. Get dual certification from IBM and UTM Malaysia with the 360DigiTMG Data Science Certification program.business analytics course in jalandhar

    ReplyDelete
  89. With multitude of career opportunities opening up in Data Science domain and more and more IT professionals are looking for best Data Science courses to start their Data Sciences career. 360DigiTMG is the best place to start your technical training. As we are equipped with world-class curriculum to suit all your technical needs.


    Data Science Course in Bangalore

    ReplyDelete
  90. Start your Data Science Course with 360DigiTMG and pave the way to your successful career with a job-ready curriculum and real-time projects that will aid you in bagging a high-paid job.
    Data Analytics Course in Calicut

    ReplyDelete
  91. With the ongoing pandemic, safety has become a top priority. With 360DigiTMG's Data Science Online Course, you can enjoy the benefits of professional training at your own home with just a click away. Enroll with us to secure your future.

    Data Scientist Course in Delhi

    ReplyDelete
  92. The new wave of innovation that is changing the way people do business is called data science. Gain expertise in organizing, sorting, and transforming data to uncover hidden patterns Learn the essential skills of probability, statistics, and machine learning along with the techniques to break your data into a simpler format to derive meaningful information. Enroll in Data science in Bangalore and give yourself a chance to power your career to greater heights.


    Data Science Training in Jodhpur

    ReplyDelete
  93. Thanks For Sharing useful content. This post is so helpfull and informative best online language tutor

    ReplyDelete
  94. Register for the Data Science certification in Bangalore and gain recognition and credibility in your organization. Learn the techniques to examine large data sets and discover patterns that are valuable to predict market trends. Learn Data Exploration and Visualizations, Neural Networks and Deep Learning, Model Evaluation and Analysis. This course will ensure that you are challenged to go from a beginner with no Data Science experience to someone who can juggle data with ease.


    Data Science Course Fees in Bangalore

    ReplyDelete
  95. The people will be able to get the benefit from the Delhi Girls as there is lots of things that will happen with you.

    ReplyDelete
  96. Thanks for sharing this useful Blog. General liability insurance often called business liability insurance and commercial liability insurance provides coverage for your business General Liability Insurance CA

    ReplyDelete
  97. Register for the Data Science training in Bangalore to gain knowledge and skill one needs to master to pursue a successful career in this chay. To pursue a career in the most in-demand field that involves analyzing data with the help of various techniques like data mining and data modeling. Join the Data Science course in Bangalore and enjoy the best facilities and premier quality curriculum that will make you an expert in deriving meaningful insightsenging field. Learn to decipher the valuable insights hidden in data with techniques like Predictive Analysis, Forecasting, Optimization, and Text mining. Avail best-in-class curriculum curated by eminent faculty

    ReplyDelete
  98. Is there any experienced and professional python developer for Dani travel agency? We've to work out on few advancements and it will be much more advancement.

    ReplyDelete
  99. You can experience a lockout situation, a car key breakage, or any other locksmith accident at any time. A professional locksmith means a person who is highly responsible, for whom the customers’ safety is a top priority as you can read there service commitment here, http://leandertxlocksmiths.com.

    ReplyDelete
  100. In Indonesia, we not say Digital Marketing, but Bakul Online

    ReplyDelete
  101. Hiring a professional masonry contractor means heading down a path using high quality and durable construction materials. No matter you are looking for professionals for masonry wall, you must know that masonry work also tends cost more because it’s more labor intensive than timber.

    ReplyDelete
  102. This post is very simple to read and appreciate without leaving any details out. data science course with placement in Bangalore Great work!.

    ReplyDelete
  103. My friend mentioned to me your blog, so I thought I’d read it for myself. Very interesting insights, will be back for more!
    best data science courses in bangalore

    ReplyDelete
  104. Thanks for the informative post. Love the Content. Your Blog is Very interesting. Learn about- software companies

    ReplyDelete
  105. Great post, your all points fully clarify, python course for high school students
    These steps are very helpful for us. Thank you for providing such valuable information.

    ReplyDelete
  106. Thanks for the informative information sharing with us. figs scrubs

    ReplyDelete
  107. This article provides a comprehensive overview of the data science process, from data collection to model deployment.data analyst course fees in chennai

    ReplyDelete
  108. This article offers a well-structured approach to data science projects, outlining the necessary steps and considerations for success. data science certification in Chennai

    ReplyDelete
  109. This post is so helpful and informative. Keep updating with more information...
    python training in Hyderabad

    ReplyDelete
  110. "Thank you for your exploration! Our software company Chennai , a thriving technology hub. Learn how we create digital stories that captivate by infusing creativity into each and every line of code. Watch with interest as we work our magic in the center of brilliant software. I appreciate you being curious.

    ReplyDelete
  111. Iz spa center provide best massage and will get b2b spa near me help prevent and treat injuries, enhance flexibility, and improve athletic performance.

    ReplyDelete
  112. spa treatments like aromatherapy or sauna sessions, which also contribute to relaxation and stress reduction, so we provide best spa service at female to male massage center near me center, there are available hot massage girl therapists, so come and enjoy

    ReplyDelete
Previous Post Next Post