[fusion_builder_container type=”flex” hundred_percent=”no” equal_height_columns=”no” menu_anchor=”” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” class=”” id=”” background_color=”” background_image=”” background_position=”center center” background_repeat=”no-repeat” fade=”no” background_parallax=”none” parallax_speed=”0.3″ video_mp4=”” video_webm=”” video_ogv=”” video_url=”” video_aspect_ratio=”16:9″ video_loop=”yes” video_mute=”yes” overlay_color=”” video_preview_image=”” border_color=”” border_style=”solid” padding_top=”” padding_bottom=”” padding_left=”” padding_right=””][fusion_builder_row][fusion_builder_column type=”1_1″ layout=”1_1″ background_position=”left top” background_color=”” border_color=”” border_style=”solid” border_position=”all” spacing=”yes” background_image=”” background_repeat=”no-repeat” padding_top=”” padding_right=”” padding_bottom=”” padding_left=”” margin_top=”0px” margin_bottom=”0px” class=”” id=”” animation_type=”” animation_speed=”0.3″ animation_direction=”left” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” center_content=”no” last=”true” min_height=”” hover_type=”none” link=”” border_sizes_top=”” border_sizes_bottom=”” border_sizes_left=”” border_sizes_right=”” first=”true”][fusion_text columns=”” column_min_width=”” column_spacing=”” rule_style=”” rule_size=”” rule_color=”” hue=”” saturation=”” lightness=”” alpha=”” user_select=”” content_alignment_medium=”” content_alignment_small=”” content_alignment=”” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” sticky_display=”normal,sticky” class=”” id=”” margin_top=”” margin_right=”” margin_bottom=”” margin_left=”” fusion_font_family_text_font=”” fusion_font_variant_text_font=”” font_size=”” line_height=”” letter_spacing=”” text_transform=”” text_color=”” animation_type=”” animation_direction=”left” animation_color=”” animation_speed=”0.3″ animation_delay=”0″ animation_offset=”” logics=””]
Python Glossary
A programming glossary for Python for the beginner. If you want a more in-depth glossary, visit the Official Python Documentation.
Class
Python is a Language that supports the Object Oriented Programming paradigm. Like other OOP languages, Python has classes which are defined wireframes of objects. Python supports class inheritance. A class may have many subclasses but may only inherit directly from one superclass.
Syntax
[/fusion_text][fusion_syntax_highlighter theme=”” language=”javascript” line_numbers=”” line_wrapping=”” copy_to_clipboard=”” copy_to_clipboard_text=”” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” class=”” id=”” font_size=”” border_size=”” border_color=”” hue=”” saturation=”” lightness=”” alpha=”” border_style=”” background_color=”” line_number_background_color=”” line_number_text_color=”” margin_top=”” margin_right=”” margin_bottom=”” margin_left=””]Y2xhc3MgQ2xhc3NOYW1lKG9iamVjdCk6CiAgICAiIiJUaGlzIGlzIGEgY2xhc3MiIiIKICAgIGNsYXNzX3ZhcmlhYmxlCiAgICBkZWYgX19pbml0X18oc2VsZiwqYXJncyk6CiAgICAgICAgc2VsZi5hcmdzID0gYXJncwogICAgZGVmIF9fcmVwcl9fKHNlbGYpOgogICAgICAgIHJldHVybiAiU29tZXRoaW5nIHRvIHJlcHJlc2VudCB0aGUgb2JqZWN0IGFzIGEgc3RyaW5nIgogICAgZGVmIG90aGVyX21ldGhvZChzZWxmLCphcmdzKToKICAgICAgICAjIGRvIHNvbWV0aGluZyBlbHNlCg==[/fusion_syntax_highlighter][fusion_text columns=”” column_min_width=”” column_spacing=”” rule_style=”” rule_size=”” rule_color=”” hue=”” saturation=”” lightness=”” alpha=”” user_select=”” content_alignment_medium=”” content_alignment_small=”” content_alignment=”” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” sticky_display=”normal,sticky” class=”” id=”” margin_top=”” margin_right=”” margin_bottom=”” margin_left=”” fusion_font_family_text_font=”” fusion_font_variant_text_font=”” font_size=”” line_height=”” letter_spacing=”” text_transform=”” text_color=”” animation_type=”” animation_direction=”left” animation_color=”” animation_speed=”0.3″ animation_delay=”0″ animation_offset=”” logics=””]
Example
[/fusion_text][fusion_syntax_highlighter theme=”” language=”javascript” line_numbers=”” line_wrapping=”” copy_to_clipboard=”” copy_to_clipboard_text=”” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” class=”” id=”” font_size=”” border_size=”” border_color=”” hue=”” saturation=”” lightness=”” alpha=”” border_style=”” background_color=”” line_number_background_color=”” line_number_text_color=”” margin_top=”” margin_right=”” margin_bottom=”” margin_left=””]CmNsYXNzIEhvcnNlKG9iamVjdCk6CiIiIkhvcnNlIHJlcHJlc2VudHMgYSBIb3JzZSIiIgpzcGVjaWVzID0gIkVxdXVzIGZlcnVzIGNhYmFsbHVzIgpkZWYgX19pbml0X18oc2VsZixjb2xvcix3ZWlnaHQsd2lsZD1GYWxzZSk6CiAgICBzZWxmLmNvbG9yID0gY29sb3IKICAgIHNlbGYud2VpZ2h0ID0gd2VpZ2h0CiAgICBzZWxmLndpbGQgPSB3aWxkCmRlZiBfX3JlcHJfXyhzZWxmKToKICAgIHJldHVybiAiJXMgaG9yc2Ugd2VpZ2hpbmcgJWYgYW5kIHdpbGQgc3RhdHVzIGlzICViIiAlIChzZWxmLmNvbG9yLHNlbGYud2VpZ2h0LHNlbGYud2lsZCkKZGVmIG1ha2Vfc291bmQoc2VsZik6CiAgICBwcmludCAibmVpZ2hoaGgiCmRlZiBtb3ZlbWVudChzZWxmKToKICAgIHJldHVybiAid2FsayIK[/fusion_syntax_highlighter][fusion_text columns=”” column_min_width=”” column_spacing=”” rule_style=”” rule_size=”” rule_color=”” hue=”” saturation=”” lightness=”” alpha=”” user_select=”” content_alignment_medium=”” content_alignment_small=”” content_alignment=”” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” sticky_display=”normal,sticky” class=”” id=”” margin_top=”” margin_right=”” margin_bottom=”” margin_left=”” fusion_font_family_text_font=”” fusion_font_variant_text_font=”” font_size=”” line_height=”” letter_spacing=”” text_transform=”” text_color=”” animation_type=”” animation_direction=”left” animation_color=”” animation_speed=”0.3″ animation_delay=”0″ animation_offset=”” logics=””]
Comments
SINGLE-LINE COMMENTS
[fusion_syntax_highlighter theme=”” language=”javascript” line_numbers=”” line_wrapping=”” copy_to_clipboard=”” copy_to_clipboard_text=”” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” class=”” id=”” font_size=”” border_size=”” border_color=”” hue=”” saturation=”” lightness=”” alpha=”” border_style=”” background_color=”” line_number_background_color=”” line_number_text_color=”” margin_top=”” margin_right=”” margin_bottom=”” margin_left=””]IyB0aGlzIGlzIGEgc2luZ2xlIGxpbmUgY29tbWVudC4K[/fusion_syntax_highlighter]
MULTI-LINE COMMENTS
[fusion_syntax_highlighter theme=”” language=”x-sh” line_numbers=”” line_wrapping=”” copy_to_clipboard=”” copy_to_clipboard_text=”” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” class=”” id=”” font_size=”” border_size=”” border_color=”” hue=”” saturation=”” lightness=”” alpha=”” border_style=”” background_color=”” line_number_background_color=”” line_number_text_color=”” margin_top=”” margin_right=”” margin_bottom=”” margin_left=””]JycnCnRoaXMgaXMKYSBtdWx0aS1saW5lCmNvbW1lbnQsIGkgYW0gaGFuZHkgZm9yIGNvbW1lbnRpbmcgb3V0IHdob2xlCmNodW5rcyBvZiBjb2RlIHZlcnkgZmFzdAonJyc=[/fusion_syntax_highlighter]
Dictionaries
Syntax
[fusion_syntax_highlighter theme=”” language=”javascript” line_numbers=”” line_wrapping=”” copy_to_clipboard=”” copy_to_clipboard_text=”” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” class=”” id=”” font_size=”” border_size=”” border_color=”” hue=”” saturation=”” lightness=”” alpha=”” border_style=”” background_color=”” line_number_background_color=”” line_number_text_color=”” margin_top=”” margin_right=”” margin_bottom=”” margin_left=””]ZGljdCgpICNjcmVhdGVzIG5ldyBlbXB0eSBkaWN0aW9uYXJ5Cnt9ICNjcmVhdGVzIG5ldyBlbXB0eSBkaWN0aW9uYXJ5Cg==[/fusion_syntax_highlighter]
Example
[fusion_syntax_highlighter theme=”” language=”javascript” line_numbers=”” line_wrapping=”” copy_to_clipboard=”” copy_to_clipboard_text=”” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” class=”” id=”” font_size=”” border_size=”” border_color=”” hue=”” saturation=”” lightness=”” alpha=”” border_style=”” background_color=”” line_number_background_color=”” line_number_text_color=”” margin_top=”” margin_right=”” margin_bottom=”” margin_left=””]Pj4gbXlfZGljdCA9IHt9Cj4+IGNvbnRlbnRfb2ZfdmFsdWUxID0gImFiY2QiCj4+IGNvbnRlbnRfb2ZfdmFsdWUyID0gInd4eXoiCj4+IG15X2RpY3QudXBkYXRlKHsia2V5X25hbWUxIjpjb250ZW50X29mX3ZhbHVlMX0pCj4+IG15X2RpY3QudXBkYXRlKHsia2V5X25hbWUyIjpjb250ZW50X29mX3ZhbHVlMn0pCj4+IG15X2RpY3QKeydrZXlfbmFtZTEnOiJhYmNkIiwgJ2tleV9uYW1lMic6Ind4eXoifQo+PiBteV9kaWN0LmdldCgia2V5X25hbWUyIikKInd4eXoi[/fusion_syntax_highlighter]
Syntax
[fusion_syntax_highlighter theme=”” language=”javascript” line_numbers=”” line_wrapping=”” copy_to_clipboard=”” copy_to_clipboard_text=”” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” class=”” id=”” font_size=”” border_size=”” border_color=”” hue=”” saturation=”” lightness=”” alpha=”” border_style=”” background_color=”” line_number_background_color=”” line_number_text_color=”” margin_top=”” margin_right=”” margin_bottom=”” margin_left=””]e2tleTE6dmFsdWUxLGtleTI6dmFsdWUyfQ==[/fusion_syntax_highlighter]
Example
[fusion_syntax_highlighter theme=”” language=”javascript” line_numbers=”” line_wrapping=”” copy_to_clipboard=”” copy_to_clipboard_text=”” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” class=”” id=”” font_size=”” border_size=”” border_color=”” hue=”” saturation=”” lightness=”” alpha=”” border_style=”” background_color=”” line_number_background_color=”” line_number_text_color=”” margin_top=”” margin_right=”” margin_bottom=”” margin_left=””]Pj4gbXlfZGljdCA9IHsia2V5MSI6WzEsMiwzXSwia2V5MiI6IkkgYW0gYSBzdHJpbmciLDEyMzo0NTZ9Cj4+IG15X2RpY3RbImtleTEiXSAjWzEsMiwzXQo+PiBteV9kaWN0WzEyM10gIzQ1Ngo+PiBteV9kaWN0WyJuZXcga2V5Il0gPSAiTmV3IHZhbHVlIgo+PiBwcmludCBteV9kaWN0Cnsia2V5MiI6IkkgYW0gYSBzdHJpbmciLCAibmV3IGtleSI6Ik5ldyB2YWx1ZSIsICJrZXkxIjpbMSwyLDNdLDEyMzo0NTZ9[/fusion_syntax_highlighter]
Functions
Syntax
[fusion_syntax_highlighter theme=”” language=”javascript” line_numbers=”” line_wrapping=”” copy_to_clipboard=”” copy_to_clipboard_text=”” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” class=”” id=”” font_size=”” border_size=”” border_color=”” hue=”” saturation=”” lightness=”” alpha=”” border_style=”” background_color=”” line_number_background_color=”” line_number_text_color=”” margin_top=”” margin_right=”” margin_bottom=”” margin_left=””]ZGVmIGZ1bmN0aW9uX25hbWUocGFyYW1ldGVycyk6CiAgIyBTb21lIGNvZGUgaGVyZQ==[/fusion_syntax_highlighter]
Example
[fusion_syntax_highlighter theme=”” language=”javascript” line_numbers=”” line_wrapping=”” copy_to_clipboard=”” copy_to_clipboard_text=”” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” class=”” id=”” font_size=”” border_size=”” border_color=”” hue=”” saturation=”” lightness=”” alpha=”” border_style=”” background_color=”” line_number_background_color=”” line_number_text_color=”” margin_top=”” margin_right=”” margin_bottom=”” margin_left=””]ZGVmIGFkZF90d28oYSwgYik6CmMgPSBhICsgYgpyZXR1cm4gYwoKIyBvciB3aXRob3V0IHRoZSBpbnRlcmltIGFzc2lnbm1lbnQgdG8gYwpkZWYgYWRkX3R3byhhLCBiKToKcmV0dXJuIGEgKyBi[/fusion_syntax_highlighter]
Syntax
[fusion_syntax_highlighter theme=”” language=”javascript” line_numbers=”” line_wrapping=”” copy_to_clipboard=”” copy_to_clipboard_text=”” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” class=”” id=”” font_size=”” border_size=”” border_color=”” hue=”” saturation=”” lightness=”” alpha=”” border_style=”” background_color=”” line_number_background_color=”” line_number_text_color=”” margin_top=”” margin_right=”” margin_bottom=”” margin_left=””]ZGVmIGZ1bmN0aW9uX25hbWUocGFyYW1ldGVycywgbmFtZWRfZGVmYXVsdF9wYXJhbWV0ZXI9dmFsdWUpOgogICMgU29tZSBjb2RlIGhlcmU=[/fusion_syntax_highlighter]
Example
[fusion_syntax_highlighter theme=”” language=”javascript” line_numbers=”” line_wrapping=”” copy_to_clipboard=”” copy_to_clipboard_text=”” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” class=”” id=”” font_size=”” border_size=”” border_color=”” hue=”” saturation=”” lightness=”” alpha=”” border_style=”” background_color=”” line_number_background_color=”” line_number_text_color=”” margin_top=”” margin_right=”” margin_bottom=”” margin_left=””]ZGVmIHNob3V0KGV4Y2xhbWF0aW9uPSJIZXkhIik6CnByaW50IGV4Y2xhbWF0aW9uCgpzaG91dCgpICMgRGlzcGxheXMgIkhleSEiCgpzaG91dCgiV2F0Y2ggT3V0ISIpICMgRGlzcGxheXMgIldhdGNoIE91dCEi[/fusion_syntax_highlighter]
Function Objects
Example
[fusion_syntax_highlighter theme=”” language=”javascript” line_numbers=”” line_wrapping=”” copy_to_clipboard=”” copy_to_clipboard_text=”” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” class=”” id=”” font_size=”” border_size=”” border_color=”” hue=”” saturation=”” lightness=”” alpha=”” border_style=”” background_color=”” line_number_background_color=”” line_number_text_color=”” margin_top=”” margin_right=”” margin_bottom=”” margin_left=””]IyBTdG9yaW5nIGZ1bmN0aW9uIG9iamVjdHMgaW4gdmFyaWFibGVzOgoKZGVmIHNheV9oZWxsbyhuYW1lKToKcmV0dXJuICJIZWxsbywgIiArIG5hbWUKCmZvbyA9IHNheV9oZWxsbygiQWxpY2UiKQojIE5vdyB0aGUgdmFsdWUgb2YgJ2ZvbycgaXMgIkhlbGxvLCBBbGljZSIKCmZ1biA9IHNheV9oZWxsbwojIE5vdyB0aGUgdmFsdWUgb2YgJ2Z1bicgaXMgYSBmdW5jdGlvbiBvYmplY3Qgd2UgY2FuIHVzZSBsaWtlIHRoZSBvcmlnaW5hbCBmdW5jdGlvbjoKYmFyID0gZnVuKCJCb2IiKQojIE5vdyB0aGUgdmFsdWUgb2YgJ2JhcicgaXMgIkhlbGxvLCBCb2Ii[/fusion_syntax_highlighter]
len()
Syntax
[fusion_syntax_highlighter theme=”” language=”javascript” line_numbers=”” line_wrapping=”” copy_to_clipboard=”” copy_to_clipboard_text=”” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” class=”” id=”” font_size=”” border_size=”” border_color=”” hue=”” saturation=”” lightness=”” alpha=”” border_style=”” background_color=”” line_number_background_color=”” line_number_text_color=”” margin_top=”” margin_right=”” margin_bottom=”” margin_left=””]bGVuKGl0ZXJhYmxlKQ==[/fusion_syntax_highlighter]
Example
[fusion_syntax_highlighter theme=”” language=”x-sh” line_numbers=”” line_wrapping=”” copy_to_clipboard=”” copy_to_clipboard_text=”” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” class=”” id=”” font_size=”” border_size=”” border_color=”” hue=”” saturation=”” lightness=”” alpha=”” border_style=”” background_color=”” line_number_background_color=”” line_number_text_color=”” margin_top=”” margin_right=”” margin_bottom=”” margin_left=””]Pj4gbXlfbGlzdCA9IFswLDQsNSwyLDMsNCw1XQo+PiBsZW4obXlfbGlzdCkKNwoKPj4gbXlfc3RyaW5nID0gJ2FiY2RlZicKPj4gbGVuKG15X3N0cmluZykKNg==[/fusion_syntax_highlighter]
List Comprehensions
Syntax
[fusion_syntax_highlighter theme=”” language=”javascript” line_numbers=”” line_wrapping=”” copy_to_clipboard=”” copy_to_clipboard_text=”” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” class=”” id=”” font_size=”” border_size=”” border_color=”” hue=”” saturation=”” lightness=”” alpha=”” border_style=”” background_color=”” line_number_background_color=”” line_number_text_color=”” margin_top=”” margin_right=”” margin_bottom=”” margin_left=””]W3ZhcmlhYmxlIGZvciB2YXJpYWJsZSBpbiBpdGVyYWJsZSBjb25kaXRpb25dClt2YXJpYWJsZSBmb3IgdmFyaWFibGUgaW4gaXRlcmFibGVd[/fusion_syntax_highlighter]
Example
[fusion_syntax_highlighter theme=”” language=”javascript” line_numbers=”” line_wrapping=”” copy_to_clipboard=”” copy_to_clipboard_text=”” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” class=”” id=”” font_size=”” border_size=”” border_color=”” hue=”” saturation=”” lightness=”” alpha=”” border_style=”” background_color=”” line_number_background_color=”” line_number_text_color=”” margin_top=”” margin_right=”” margin_bottom=”” margin_left=””]Pj4geF9saXN0ID0gWzEsMiwzLDQsNSw2LDddCj4+IGV2ZW5fbGlzdCA9IFtudW0gZm9yIG51bSBpbiB4X2xpc3QgaWYgKG51bSAlIDIgPT0gMCldCj4+IGV2ZW5fbGlzdApbMiw0LDZdCgo+PiBtX2xpc3QgPSBbJ0FCJywgJ0FDJywgJ0RBJywgJ0ZHJywgJ0xCJ10KPj4gQV9saXN0ID0gW2R1byBmb3IgZHVvIGluIG1fbGlzdCBpZiAoJ0EnIGluIGR1byldCj4+IEFfbGlzdApbJ0FCJywgJ0FDJywgJ0RBJ10=[/fusion_syntax_highlighter]
Lists
Example
[fusion_syntax_highlighter theme=”” language=”javascript” line_numbers=”” line_wrapping=”” copy_to_clipboard=”” copy_to_clipboard_text=”” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” class=”” id=”” font_size=”” border_size=”” border_color=”” hue=”” saturation=”” lightness=”” alpha=”” border_style=”” background_color=”” line_number_background_color=”” line_number_text_color=”” margin_top=”” margin_right=”” margin_bottom=”” margin_left=””]Pj4geCA9IFsxLCAyLCAzLCA0XQo+PiB5ID0gWydzcGFtJywgJ2VnZ3MnXQoKPj4geS5hcHBlbmQoJ21hc2gnKQo+PiB5Clsnc3BhbScsICdlZ2dzJywgJ21hc2gnXQoKPj4geSArPSBbJ2JlYW5zJ10KPj4geQpbJ3NwYW0nLCAnZWdncycsICdtYXNoJywgJ2JlYW5zJ10=[/fusion_syntax_highlighter]
Loops
FOR LOOPS
Example
[fusion_syntax_highlighter theme=”” language=”javascript” line_numbers=”” line_wrapping=”” copy_to_clipboard=”” copy_to_clipboard_text=”” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” class=”” id=”” font_size=”” border_size=”” border_color=”” hue=”” saturation=”” lightness=”” alpha=”” border_style=”” background_color=”” line_number_background_color=”” line_number_text_color=”” margin_top=”” margin_right=”” margin_bottom=”” margin_left=””]Pj4gZm9yIGkgaW4gcmFuZ2UoMCwgMyk6Cj4+IHByaW50KGkqCgoyKQowCjIKNAoKPj4gbV9saXN0ID0gWyJTaXIiLCAiTGFuY2Vsb3QiLCAiQ29jb251dHMiXQo+PiBmb3IgaXRlbSBpbiBtX2xpc3Q6Cj4+IHByaW50KGl0ZW0pClNpcgpMYW5jZWxvdApDb2NvbnV0cwoKPj4gd19zdHJpbmcgPSAiU3dpZnQiCj4+IGZvciBsZXR0ZXIgaW4gd19zdHJpbmc6Cj4+IHByaW50KGxldHRlcikKUwp3CmkKZgp0[/fusion_syntax_highlighter]
WHILE LOOPS
Example
[fusion_syntax_highlighter theme=”” language=”javascript” line_numbers=”” line_wrapping=”” copy_to_clipboard=”” copy_to_clipboard_text=”” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” class=”” id=”” font_size=”” border_size=”” border_color=”” hue=”” saturation=”” lightness=”” alpha=”” border_style=”” background_color=”” line_number_background_color=”” line_number_text_color=”” margin_top=”” margin_right=”” margin_bottom=”” margin_left=””]Pj4gbG9vcGluZ19uZWVkZWQgPSBUcnVlCj4+Cj4+IHdoaWxlIGxvb3BpbmdfbmVlZGVkOgo+PiAjIHNvbWUgb3BlcmF0aW9uIG9uIGRhdGEKPj4gaWYgY29uZGl0aW9uOgo+PiBsb29waW5nX25lZWRlZCA9IEZhbHNl[/fusion_syntax_highlighter]
print()
Example
[fusion_syntax_highlighter theme=”” language=”javascript” line_numbers=”” line_wrapping=”” copy_to_clipboard=”” copy_to_clipboard_text=”” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” class=”” id=”” font_size=”” border_size=”” border_color=”” hue=”” saturation=”” lightness=”” alpha=”” border_style=”” background_color=”” line_number_background_color=”” line_number_text_color=”” margin_top=”” margin_right=”” margin_bottom=”” margin_left=””]IyBUaGlzIHdpbGwgd29yayBpbiBhbGwgbW9kZXJuIHZlcnNpb25zIG9mIFB5dGhvbgpwcmludCgic29tZSB0ZXh0IGhlcmUiKQojIHNvbWUgdGV4dCBoZXJlCgojIEJ1dCB0aGlzIG9ubHkgd29ya3MgaW4gUHl0aG9uIHZlcnNpb25zIGxvd2VyIHRoYW4gMy54CnByaW50ICJzb21lIHRleHQgaGVyZSB0b28iCiMgc29tZSB0ZXh0IGhlcmUgdG9v[/fusion_syntax_highlighter]
range()
Syntax
[fusion_syntax_highlighter theme=”” language=”javascript” line_numbers=”” line_wrapping=”” copy_to_clipboard=”” copy_to_clipboard_text=”” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” class=”” id=”” font_size=”” border_size=”” border_color=”” hue=”” saturation=”” lightness=”” alpha=”” border_style=”” background_color=”” line_number_background_color=”” line_number_text_color=”” margin_top=”” margin_right=”” margin_bottom=”” margin_left=””]YXJndW1lbnQgdmFyaWF0aW9uczoKcmFuZ2UodGVybWluYWwpCnJhbmdlKHN0YXJ0LCB0ZXJtaW5hbCkKcmFuZ2Uoc3RhcnQsIHRlcm1pbmFsLCBzdGVwX3NpemUp[/fusion_syntax_highlighter]
Example
[fusion_syntax_highlighter theme=”” language=”javascript” line_numbers=”” line_wrapping=”” copy_to_clipboard=”” copy_to_clipboard_text=”” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” class=”” id=”” font_size=”” border_size=”” border_color=”” hue=”” saturation=”” lightness=”” alpha=”” border_style=”” background_color=”” line_number_background_color=”” line_number_text_color=”” margin_top=”” margin_right=”” margin_bottom=”” margin_left=””]Pj4gcmFuZ2UoNCkKWzAsIDEsIDIsIDNdCgo+PiByYW5nZSgyLCA4KQpbMiwgMywgNCwgNSwgNiwgN10KCj4+IHJhbmdlKDIsIDEzLCAzKQpbMiwgNSwgOCwgMTFd[/fusion_syntax_highlighter]
Sets
Example
[fusion_syntax_highlighter theme=”” language=”javascript” line_numbers=”” line_wrapping=”” copy_to_clipboard=”” copy_to_clipboard_text=”” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” class=”” id=”” font_size=”” border_size=”” border_color=”” hue=”” saturation=”” lightness=”” alpha=”” border_style=”” background_color=”” line_number_background_color=”” line_number_text_color=”” margin_top=”” margin_right=”” margin_bottom=”” margin_left=””]Pj4gbmV3X3NldCA9IHsxLCAyLCAzLCA0LCA0LCA0LCdBJywgJ0InLCAnQicsICdDJ30KPj4gbmV3X3NldAp7J0EnLCAxLCAnQycsIDMsIDQsIDIsICdCJ30KCj4+IGR1cF9saXN0ID0gWzEsMSwyLDIsMiwzLDQsNTUsNSw1LDYsNyw4LDhdCj4+IHNldF9mcm9tX2xpc3QgPSBzZXQoZHVwX2xpc3QpCj4+IHNldF9mcm9tX2xpc3QKezEsIDIsIDMsIDQsIDUsIDYsIDcsIDgsIDU1fQ==[/fusion_syntax_highlighter]
Slice
Example
[fusion_syntax_highlighter theme=”” language=”javascript” line_numbers=”” line_wrapping=”” copy_to_clipboard=”” copy_to_clipboard_text=”” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” class=”” id=”” font_size=”” border_size=”” border_color=”” hue=”” saturation=”” lightness=”” alpha=”” border_style=”” background_color=”” line_number_background_color=”” line_number_text_color=”” margin_top=”” margin_right=”” margin_bottom=”” margin_left=””]Pj4gIyBTcGVjaWZ5aW5nIGEgYmVnaW5uaW5nIGFuZCBlbmQ6Cj4+IHggPSBbMSwgMiwgMywgNF0KPj4geFsyOjNdClszXQoKPj4gIyBTcGVjaWZ5aW5nIHN0YXJ0IGF0IHRoZSBiZWdpbm5pbmcgYW5kIGVuZCBhdCB0aGUgc2Vjb25kIGVsZW1lbnQKPj4geFs6Ml0KWzEsIDJdCgo+PiAjIFNwZWNpZnlpbmcgc3RhcnQgYXQgdGhlIG5leHQgdG8gbGFzdCBlbGVtZW50IGFuZCBnbyB0byB0aGUgZW5kCj4+IHhbLTI6XQpbMywgNF0KCj4+ICMgU3BlY2lmeWluZyBzdGFydCBhdCB0aGUgYmVnaW5uaW5nIGFuZCBnbyB0byB0aGUgbmV4dCB0byBsYXN0IGVsZW1lbnQKPj4geFs6LTFdClsxLCAyLCAzXQoKPj4gIyBTcGVjaWZ5aW5nIGEgc3RlcCBhcmd1bWVudCByZXR1cm5zIGV2ZXJ5IG4tdGggaXRlbQo+PiB5ID0gWzEsIDIsIDMsIDQsIDUsIDYsIDcsIDhdCj4+IHlbOjoyXQpbMSwgMywgNSwgN10KCj4+ICMgUmV0dXJuIGEgcmV2ZXJzZWQgdmVyc2lvbiBvZiB0aGUgbGlzdCAoIG9yIHN0cmluZyApCj4+IHhbOjotMV0KWzQsIDMsIDIsIDFdCgo+PiAjIFN0cmluZyByZXZlcnNlCj4+IG15X3N0cmluZyA9ICJBbG9oYSIKPj4gbXlfc3RyaW5nWzo6LTFdCiJhaG9sQSI=[/fusion_syntax_highlighter]
str()
Example
[fusion_syntax_highlighter theme=”” language=”x-sh” line_numbers=”” line_wrapping=”” copy_to_clipboard=”” copy_to_clipboard_text=”” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” class=”” id=”” font_size=”” border_size=”” border_color=”” hue=”” saturation=”” lightness=”” alpha=”” border_style=”” background_color=”” line_number_background_color=”” line_number_text_color=”” margin_top=”” margin_right=”” margin_bottom=”” margin_left=””]Pj4gIyBTdWNoIGZlYXR1cmVzIGNhbiBiZSB1c2VmdWwgZm9yIGNvbmNhdGVuYXRpbmcgc3RyaW5ncwo+PiBteV92YXIgPSAxMjMKPj4gbXlfdmFyCjEyMwoKPj4gc3RyKG15X3ZhcikKJzEyMycKCj4+IG15X2Jvb2tpbmcgPSAiREIgQWlybGluZXMgRmxpZ2h0ICIgKyBzdHIobXlfdmFyKQo+PiBteV9ib29raW5nCidEQiBBaXJsaW5lcyBGbGlnaHQgMTIzJw==[/fusion_syntax_highlighter]
Strings
Example
[fusion_syntax_highlighter theme=”” language=”javascript” line_numbers=”” line_wrapping=”” copy_to_clipboard=”” copy_to_clipboard_text=”” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” class=”” id=”” font_size=”” border_size=”” border_color=”” hue=”” saturation=”” lightness=”” alpha=”” border_style=”” background_color=”” line_number_background_color=”” line_number_text_color=”” margin_top=”” margin_right=”” margin_bottom=”” margin_left=””]Pj4gbXlfc3RyaW5nMSA9ICJ0aGlzIGlzIGEgdmFsaWQgc3RyaW5nIgo+PiBteV9zdHJpbmcyID0gJ3RoaXMgaXMgYWxzbyBhIHZhbGlkIHN0cmluZycKPj4gbXlfc3RyaW5nMyA9ICd0aGlzIGlzJyArICcgJyArICdhbHNvJyArICcgJyArICdhIHN0cmluZycKPj4gbXlfc3RyaW5nMwoidGhpcyBpcyBhbHNvIGEgc3RyaW5nIg==[/fusion_syntax_highlighter]
Tuples
Example
[fusion_syntax_highlighter theme=”” language=”javascript” line_numbers=”” line_wrapping=”” copy_to_clipboard=”” copy_to_clipboard_text=”” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” class=”” id=”” font_size=”” border_size=”” border_color=”” hue=”” saturation=”” lightness=”” alpha=”” border_style=”” background_color=”” line_number_background_color=”” line_number_text_color=”” margin_top=”” margin_right=”” margin_bottom=”” margin_left=””]Pj4geCA9ICgxLCAyLCAzLCA0KQo+PiB5ID0gKCdzcGFtJywgJ2VnZ3MnKQoKPj4gbXlfbGlzdCA9IFsxLDIsMyw0XQo+PiBteV90dXBsZSA9IHR1cGxlKG15X2xpc3QpCj4+IG15X3R1cGxlCigxLCAyLCAzLCA0KQ==[/fusion_syntax_highlighter]
TUPLE ASSIGNMENT
Example
[fusion_syntax_highlighter theme=”” language=”javascript” line_numbers=”” line_wrapping=”” copy_to_clipboard=”” copy_to_clipboard_text=”” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” class=”” id=”” font_size=”” border_size=”” border_color=”” hue=”” saturation=”” lightness=”” alpha=”” border_style=”” background_color=”” line_number_background_color=”” line_number_text_color=”” margin_top=”” margin_right=”” margin_bottom=”” margin_left=””]bmFtZSwgYWdlID0gKCJBbGljZSIsIDE5KQojIE5vdyBuYW1lIGhhcyB0aGUgdmFsdWUgIkFsaWNlIiBhbmQgYWdlIGhhcyB0aGUgdmFsdWUgMTkKCiMgWW91IGNhbiBhbHNvIG9taXQgdGhlIHBhcmVudGhlc2VzOgpuYW1lLCBhZ2UgPSAiQWxpY2UiLCAxOQ==[/fusion_syntax_highlighter]
Variables
Example
[fusion_syntax_highlighter theme=”” language=”javascript” line_numbers=”” line_wrapping=”” copy_to_clipboard=”” copy_to_clipboard_text=”” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” class=”” id=”” font_size=”” border_size=”” border_color=”” hue=”” saturation=”” lightness=”” alpha=”” border_style=”” background_color=”” line_number_background_color=”” line_number_text_color=”” margin_top=”” margin_right=”” margin_bottom=”” margin_left=””]Pj4geCA9IDEyCj4+IHgKMTI=[/fusion_syntax_highlighter]
Python Glossary
1. Python
Python is a high-level, interpreted programming language known for its simplicity and readability.
print("Hello, world!")
2. Variable
A variable is a name that refers to a value stored in memory.
x = 5
3. String
A string is a sequence of characters enclosed in single or double quotes.
message = "Hello, world!"
4. Integer
An integer is a whole number without a decimal point.
age = 30
5. Float
A float is a number with a decimal point.
pi = 3.14
6. List
A list is a collection of items, which can be of different types, enclosed in square brackets and separated by commas.
numbers = [1, 2, 3, 4, 5]
7. Tuple
A tuple is an immutable collection of items, enclosed in parentheses and separated by commas.
coordinates = (10, 20)
8. Dictionary
A dictionary is a collection of key-value pairs, enclosed in curly braces and separated by commas.
person = {'name': 'John', 'age': 30}
9. Function
A function is a block of reusable code that performs a specific task.
def greet(name):
print("Hello, " + name + "!")
10. Module
A module is a file containing Python code that can be imported and used in other Python programs.
import math
11. Loop
A loop is a control structure that repeats a block of code multiple times.
for i in range(5):
print(i)
12. Conditional Statement
A conditional statement is a control structure that executes different code blocks based on whether a condition is true or false.
if x > 0:
print("Positive")
else:
print("Negative")
13. Class
A class is a blueprint for creating objects that have similar attributes and methods.
class Car:
def __init__(self, make, model):
self.make = make
self.model = model
14. Object
An object is an instance of a class.
car = Car("Toyota", "Camry")
15. Exception
An exception is an error that occurs during the execution of a program.
try:
result = 10 / 0
except ZeroDivisionError:
print("Cannot divide by zero")
16. Method
A method is a function that belongs to an object.
class Dog:
def bark(self):
print("Woof!")
17. Attribute
An attribute is a value associated with an object.
dog = Dog()
dog.breed = "Labrador"
[/fusion_text][fusion_text columns=”” column_min_width=”” column_spacing=”” rule_style=”” rule_size=”” rule_color=”” hue=”” saturation=”” lightness=”” alpha=”” user_select=”” content_alignment_medium=”” content_alignment_small=”” content_alignment=”center” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” sticky_display=”normal,sticky” class=”” id=”” margin_top=”50px” margin_right=”” margin_bottom=”” margin_left=”” fusion_font_family_text_font=”” fusion_font_variant_text_font=”” font_size=”” line_height=”” letter_spacing=”” text_transform=”” text_color=”” animation_type=”” animation_direction=”left” animation_color=”” animation_speed=”0.3″ animation_delay=”0″ animation_offset=”” logics=””]
Python Workshop – All The Keywords
[/fusion_text][fusion_youtube id=”https://www.youtube.com/watch?v=CGBHb2NLS7I” alignment=”center” width=”” height=”” autoplay=”false” mute=”false” api_params=”” title_attribute=”” video_facade=”” margin_top=”50px” margin_bottom=”50px” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” class=”” css_id=”” structured_data=”off” video_upload_date=”” video_duration=”” video_title=”” video_desc=”” /][fusion_text columns=”” column_min_width=”” column_spacing=”” rule_style=”” rule_size=”” rule_color=”” hue=”” saturation=”” lightness=”” alpha=”” user_select=”” content_alignment_medium=”” content_alignment_small=”” content_alignment=”” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” sticky_display=”normal,sticky” class=”” id=”” margin_top=”50px” margin_right=”” margin_bottom=”” margin_left=”” fusion_font_family_text_font=”” fusion_font_variant_text_font=”” font_size=”” line_height=”” letter_spacing=”” text_transform=”” text_color=”” animation_type=”” animation_direction=”left” animation_color=”” animation_speed=”0.3″ animation_delay=”0″ animation_offset=”” logics=””]
Related Videos:
Related Posts:
Exploring the Pillars of Object-Oriented Programming: A Pythonic Journey
Introduction to JavaScript – Comments
What is the default value for Boolean variable in VB.NET?
[/fusion_text][/fusion_builder_column][/fusion_builder_row][/fusion_builder_container]

