[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-seo-697975-105":3,"detail-sidebar-cat-0-en-105":80,"doc-detail-697975-en":130,"doc-similar-697975":161},{"code":4,"msg":5,"data":6},0,"ok",{"site_id":7,"language":8,"slug":9,"title":10,"keywords":11,"description":12,"schema_data":13,"social_meta":73,"head_meta":75,"extra_data":77,"updated_unix":79},105,"en","python-variable-types-variable-assignment-multiple-assignment-and-standard-data-types","Python Variable Types - Variable Assignment, Multiple Assignment, and Standard Data Types","","Python variable types explain how variables reserve memory locations, how the interpreter allocates storage based on assigned data types, and how assignments work using the equals operator. The material covers assigning values, multiple assignment to one or several variables, and then reviews Python’s standard data types: numbers, strings, lists, tuples, and dictionaries. Examples include integer, floating, and complex handling, string slicing and concatenation, and list operations using indexing and operators.",{"@graph":14,"@context":72},[15,34,55],{"@type":16,"itemListElement":17},"BreadcrumbList",[18,23,27,31],{"item":19,"name":20,"@type":21,"position":22},"https://docshare.wps.com","Home","ListItem",1,{"item":24,"name":25,"@type":21,"position":26},"https://docshare.wps.com/document/","Document",2,{"item":28,"name":29,"@type":21,"position":30},"https://docshare.wps.com/document/technology/","Technology",3,{"item":32,"name":10,"@type":21,"position":33},"https://docshare.wps.com/document/python-variable-types-variable-assignment-multiple-assignment-and-standard-data-types/697975/",4,{"url":32,"name":10,"@type":35,"image":36,"author":41,"headline":10,"publisher":44,"fileFormat":47,"inLanguage":8,"description":12,"dateModified":48,"datePublished":49,"encodingFormat":47,"isAccessibleForFree":50,"interactionStatistic":51},"DigitalDocument",{"url":37,"@type":38,"width":39,"height":40},"https://docshare.wps.com/thumbnails/python-variable-types-variable-assignment-multiple-assignment-and-standard-data-types/697975.png","ImageObject",300,407,{"name":42,"@type":43},"Noah","Person",{"url":19,"name":45,"@type":46},"DocShare","Organization","application/pdf","2026-11-15","2026-11-12",true,{"@type":52,"interactionType":53,"userInteractionCount":30},"InteractionCounter",{"@type":54},"ViewAction",{"@type":56,"mainEntity":57},"FAQPage",[58,64,68],{"name":59,"@type":60,"acceptedAnswer":61},"What is a Python variable and why is memory reserved for it?","Question",{"text":62,"@type":63},"A Python variable is a reserved memory location used to store values. When a value is assigned, the interpreter allocates memory and determines what can be stored based on the data type.","Answer",{"name":65,"@type":60,"acceptedAnswer":66},"How does multiple assignment work in Python?",{"text":67,"@type":63},"Python can assign one value to several variables at once (e.g., a = b = c = 1) or assign multiple objects to multiple variables using comma-separated targets (e.g., a, b, c = 1, 2, \"john\").",{"name":69,"@type":60,"acceptedAnswer":70},"What are Python’s standard data types covered in the material?",{"text":71,"@type":63},"The material lists five standard data types: Numbers, String, List, Tuple, and Dictionary, and then gives details for numbers, strings, and lists.","https://schema.org",{"og:url":32,"og:type":74,"og:title":10,"og:site_name":45,"og:description":12},"article",{"robots":76,"canonical":32},"index,follow",{"doc_id":78,"site_id":7},697975,1794446554,{"code":4,"msg":81,"data":82},"success",[83,87,91,95,100,104,109,114,119,122,126],{"id":22,"doc_module":4,"doc_module_name":25,"category_name":84,"show_sort_weight":85,"slug":86},"Story & Novel",90,"story-novel",{"id":26,"doc_module":4,"doc_module_name":25,"category_name":88,"show_sort_weight":89,"slug":90},"Literature",80,"literature",{"id":33,"doc_module":4,"doc_module_name":25,"category_name":92,"show_sort_weight":93,"slug":94},"Exam",70,"exam",{"id":96,"doc_module":4,"doc_module_name":25,"category_name":97,"show_sort_weight":98,"slug":99},5,"Comic",60,"comic",{"id":101,"doc_module":4,"doc_module_name":25,"category_name":29,"show_sort_weight":102,"slug":103},6,50,"technology",{"id":105,"doc_module":4,"doc_module_name":25,"category_name":106,"show_sort_weight":107,"slug":108},7,"Healthcare",40,"healthcare",{"id":110,"doc_module":4,"doc_module_name":25,"category_name":111,"show_sort_weight":112,"slug":113},8,"Research & Report",30,"research-report",{"id":115,"doc_module":4,"doc_module_name":25,"category_name":116,"show_sort_weight":117,"slug":118},9,"Religion & Spirituality",20,"religion-spirituality",{"id":117,"doc_module":4,"doc_module_name":25,"category_name":120,"show_sort_weight":117,"slug":121},"World Cup","world-cup",{"id":123,"doc_module":4,"doc_module_name":25,"category_name":124,"show_sort_weight":123,"slug":125},10,"Lifestyle","lifestyle",{"id":127,"doc_module":4,"doc_module_name":25,"category_name":128,"show_sort_weight":96,"slug":129},19,"General","general",{"code":4,"msg":81,"data":131},{"doc_id":78,"user_id":132,"nickname":42,"user_avatar":133,"doc_module":4,"category_id":101,"category_name":29,"doc_title":10,"doc_description":12,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":30,"is_deleted":4,"is_public":22,"is_downloadable":22,"audit_status":22,"page_count":101,"language":139,"language_code":8,"site_id":7,"html_lang":8,"table_of_contents":140,"faqs":141,"seo_title":142,"seo_description":12,"update_tm":79,"read_time":143,"preview_page_count":33,"preview_urls":144},8796095462418,"https://ap-avatar.wpscdn.com/avatar/80000253c1241d02b47?x-image-process=image/resize,m_fixed,w_180,h_180&k=1778826106357471780","[http://www.tutorialspoint.com/python/python_variable _types.htm](http://www.tutorialspoint.com/python/python_variable _types.htm) Copyright © [tutorials point.com](tutorials point.com)  \nVariables are nothing but reserved memory locations to store values . This means that when you create a variable you reserve some space in memory.  \nBased on the data type of a variable , the interpreter allocates memory and decides what canbe stored in thereserved memory. Therefore , by assigning different data types to variables , you can store integers , decimals or characters in these variables .  \nAssigning Values to Variables:  \nPython variables do not have to be explicitly declared to reserve memory space . The declaration happens automatically when you assign a value to a variable . The equal sign (=) is used to assign values to variables .  \nThe operand to the left of the = operator is the name of the variable and the operand to the right of the = operator is the value stored in the variable . For example :  \n\\#!/usr/bin/python  \ncounter = 100 miles = 1000 .0  \nname = \"John \"  \n\\# An integer assignment  \n\\# A floating point  \n\\# A string  \nprint counter  \nprint miles  \nprint name  \nHere , 100, 1000.0 and \"John\" are the values assigned to counter, miles and name variables , respectively. While running this program, this will produce the following result:  \n1001000 .0 John  \nMultiple Assignment:  \nPython allows you to assign a single value to several variables simultaneously. For example :  \na = b = c = 1  \nHere , an integer object is created with the value 1, and all three variables are assigned to the same memory location. You can also assign multiple objects to multiple variables . For example :  \na, b, c = 1 , 2 , \"john \"  \nHere , two integer objects with values 1 and 2 are assigned to variables a and b, and one string object with the value \"john\" is assigned to the variable c .  \nStandard Data Types:  \nThe data stored in memory canbe of many types . For example , a person's age is stored as a numeric value and his or her address is stored as alphanumeric characters . Python has various standard types that are used to define the operations possible on them and the storage method for each of them.  \nPython has five standard data types:  \n Numbers  \n String  \n List  \n Tuple  \n Dictionary  \nPython Numbers:  \nNumber data types store numeric values . They are immutable data types which means that changing the value of a number data type results ina newly allocated object.  \nNumber objects are created when you assign a value to them. For example :  \nvar1 = 1  \nvar2 = 10  \nYou can also delete the reference to a number object by using the del statement. The syntax of the del statement is:  \ndel var1 [,var2 [,var3 [ . . . .,varN ]]]]  \nYou can delete a single object or multiple objects by using the del statement. For example :  \ndel var  \ndel var_a, var_b  \nPython supports four different numerical types:  \n int (signed integers)  \n long (long integers [canalso be represented in octal and hexadecimal])  \n float (floating point real values)  \n complex (complex numbers)  \nExamples:  \nHere are some examples of numbers:  \n\n| int | long | float | complex |\n| --- | --- | --- | --- |\n| 10 | 51924361L | 0.0 | 3. 14j |\n| 100 | -0x19323L | 15.20 | 45.j |\n| -786 | 0122L | -21.9 | 9.322e-36j |\n| 080 | 0xDEFABCECBDAECBFBAEl | 32.3+e 18 | . 876j |\n| -0490 | 535633629843L | -90. | - . 6545+0J |\n| -0x260 | -052318172735L | -32.54e 100 | 3e +26J |\n| 0x69 | -4721885298529L | 70. 2-E12 | 4.53e-7j |\n\n Python allows you to use a lowercase L with long , butitis recommended that you use only an uppercase L to avoid confusion with the number 1 . Python displays long integers with an uppercase L.  \n A complex number consists of an ordered pair of real floating-point numbers denoted by a + bj , where a is the real part and b is the imaginary part of the complex number.  \nPython Strings:  \nStrings in Python are identified as a contiguous set of characters inbetween qu","cbCaiinBTwOjIBdc","https://ap.wps.com/l/cbCaiinBTwOjIBdc","pdf",58554,"English","# Assigning Values to Variables\n# Multiple Assignment\n# Standard Data Types\n## Numbers\n## Strings\n## Lists","[{\"question\":\"What is a Python variable and why is memory reserved for it?\",\"answer\":\"A Python variable is a reserved memory location used to store values. When a value is assigned, the interpreter allocates memory and determines what can be stored based on the data type.\"},{\"question\":\"How does multiple assignment work in Python?\",\"answer\":\"Python can assign one value to several variables at once (e.g., a = b = c = 1) or assign multiple objects to multiple variables using comma-separated targets (e.g., a, b, c = 1, 2, \\\"john\\\").\"},{\"question\":\"What are Python’s standard data types covered in the material?\",\"answer\":\"The material lists five standard data types: Numbers, String, List, Tuple, and Dictionary, and then gives details for numbers, strings, and lists.\"}]","Python Variable Types - Variable Assignment, Multiple Assignment, and Standard Data Types | PDF",15,[145,149,153,157],{"page_no":22,"url":146,"width":147,"height":148},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/ace06c742eff6840bd2bed71aa765bce.webp",983,1390,{"page_no":26,"url":150,"width":151,"height":152},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/7d5091b0169871cd31398a27000b714a.webp",982,1389,{"page_no":30,"url":154,"width":155,"height":156},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/6f56fba2df15c193e79df7e11715d729.webp",981,1387,{"page_no":33,"url":158,"width":159,"height":160},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/4ce3b581a51e437eb8c0b9b88a94d952.webp",980,1386,{"list":162,"token":11},[163,169,175,180,186,192,198,204,210,216],{"doc_id":164,"doc_title":165,"file_type":137,"home_preview_img_url":166,"slug":167,"view_count":96,"category_name":29,"create_tm":168},685779,"Topic 6 - Lists, Sets, Tuples, Dictionaries","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230000203959/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111939&Signature=xVKw9jvyay%2B2nO8u4TW%2BRYqZzU8%3D","topic-6-lists-sets-tuples-dictionaries",1794018231,{"doc_id":170,"doc_title":171,"file_type":137,"home_preview_img_url":172,"slug":173,"view_count":33,"category_name":29,"create_tm":174},697980,"TUPLES AND DICTIONARIES - Introduction to Tuples","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230010146829/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111939&Signature=IguPqX%2FBwXJsq0q%2Bqn4bNKjPeW4%3D","tuples-and-dictionaries-introduction-to-tuples",1794446564,{"doc_id":176,"doc_title":177,"file_type":137,"home_preview_img_url":178,"slug":179,"view_count":105,"category_name":29,"create_tm":79},697976,"6.0001 Lecture 5 - Tuples, Lists, Aliasing, Mutability, Cloning","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230010146768/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111939&Signature=SENBcerOmy3WNGB90%2Bb9nOedtF8%3D","60001-lecture-5-tuples-lists-aliasing-mutability-cloning",{"doc_id":181,"doc_title":182,"file_type":137,"home_preview_img_url":183,"slug":184,"view_count":96,"category_name":29,"create_tm":185},685778,"1-Tuples","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230000203953/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111939&Signature=glzjV5ZG7FMh%2B5YLzAf9wQPnyeU%3D","1-tuples",1794018230,{"doc_id":187,"doc_title":188,"file_type":137,"home_preview_img_url":189,"slug":190,"view_count":96,"category_name":29,"create_tm":191},685631,"Introduction to List - List Operations - Traversing a List - List Methods and Built-in Functions","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229999084036/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111939&Signature=Oxd67DRRcLR82CIJf8%2BaMczjuig%3D","introduction-to-list-list-operations-traversing-a-list-list-methods-and-built-in-functions",1794016095,{"doc_id":193,"doc_title":194,"file_type":137,"home_preview_img_url":195,"slug":196,"view_count":105,"category_name":29,"create_tm":197},670917,"Python 3 Cheat Sheet - concise reference","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229988704071/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111939&Signature=JSEZF0pTXr5DxbNIl1H1OIbBEI4%3D","python-3-cheat-sheet-concise-reference",1793572698,{"doc_id":199,"doc_title":200,"file_type":137,"home_preview_img_url":201,"slug":202,"view_count":101,"category_name":29,"create_tm":203},697978,"Lecture 4: Tuples, List Slicing, List Comprehension, Strings","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230010146771/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111939&Signature=Wvz6zlSWxDmO1VACn%2BvUBKF8%2B44%3D","lecture-4-tuples-list-slicing-list-comprehension-strings",1794446559,{"doc_id":205,"doc_title":206,"file_type":137,"home_preview_img_url":207,"slug":208,"view_count":105,"category_name":29,"create_tm":209},685771,"Compound Data - Lists, Tuples, Dictionaries - Unit IV - Learning Notes","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230000203726/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111939&Signature=jumpzko6zAQfaWcOKaCtvUrdyuY%3D","compound-data-lists-tuples-dictionaries-unit-iv-learning-notes",1794018217,{"doc_id":211,"doc_title":212,"file_type":137,"home_preview_img_url":213,"slug":214,"view_count":96,"category_name":29,"create_tm":215},692235,"Learning Python - Fourth Edition - Learn Python Programming","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230003011256/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111939&Signature=RsCUFd6Ah2y4T6RhDWGO%2FzuUUZU%3D","learning-python-fourth-edition-learn-python-programming",1794186387,{"doc_id":217,"doc_title":218,"file_type":137,"home_preview_img_url":219,"slug":220,"view_count":30,"category_name":29,"create_tm":221},685772,"UNIT-IV - LIST, TUPLES, DICTIONARIES - Problem Solving and Python Programming","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230000203776/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111939&Signature=HkvxzSYwEXqQ8thGlmT1p0noUsU%3D","unit-iv-list-tuples-dictionaries-problem-solving-and-python-programming",1794018219]