<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://onnocenter.or.id/wiki/index.php?action=history&amp;feed=atom&amp;title=Python%3A_Tipe_Variable</id>
	<title>Python: Tipe Variable - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://onnocenter.or.id/wiki/index.php?action=history&amp;feed=atom&amp;title=Python%3A_Tipe_Variable"/>
	<link rel="alternate" type="text/html" href="https://onnocenter.or.id/wiki/index.php?title=Python:_Tipe_Variable&amp;action=history"/>
	<updated>2026-04-16T04:14:11Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.4</generator>
	<entry>
		<id>https://onnocenter.or.id/wiki/index.php?title=Python:_Tipe_Variable&amp;diff=63097&amp;oldid=prev</id>
		<title>Onnowpurbo: /* Multiple Assignment */</title>
		<link rel="alternate" type="text/html" href="https://onnocenter.or.id/wiki/index.php?title=Python:_Tipe_Variable&amp;diff=63097&amp;oldid=prev"/>
		<updated>2021-01-25T23:45:23Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Multiple Assignment&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 23:45, 25 January 2021&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l28&quot; &gt;Line 28:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 28:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Multiple Assignment==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Multiple Assignment==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Python &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;allows you to assign a single value to several variables simultaneously&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;For example −&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Python &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;memungkinkan kita untuk menetapkan satu nilai ke beberapa variabel secara bersamaan&lt;/ins&gt;. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Misalnya -&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  a = b = c = 1&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  a = b = c = 1&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Onnowpurbo</name></author>
	</entry>
	<entry>
		<id>https://onnocenter.or.id/wiki/index.php?title=Python:_Tipe_Variable&amp;diff=63096&amp;oldid=prev</id>
		<title>Onnowpurbo: /* Memasukan Nilai ke Variabel */</title>
		<link rel="alternate" type="text/html" href="https://onnocenter.or.id/wiki/index.php?title=Python:_Tipe_Variable&amp;diff=63096&amp;oldid=prev"/>
		<updated>2021-01-25T23:44:39Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Memasukan Nilai ke Variabel&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 23:44, 25 January 2021&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l7&quot; &gt;Line 7:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 7:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Variabel Python tidak membutuhkan deklarasi eksplisit untuk memesan tempat memori. Deklarasi terjadi secara otomatis saat kita menetapkan nilai ke variabel. Tanda sama dengan (=) digunakan untuk menetapkan nilai ke variabel.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Variabel Python tidak membutuhkan deklarasi eksplisit untuk memesan tempat memori. Deklarasi terjadi secara otomatis saat kita menetapkan nilai ke variabel. Tanda sama dengan (=) digunakan untuk menetapkan nilai ke variabel.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Operan di sebelah kiri operator = adalah nama variabel dan &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;operan &lt;/del&gt;di sebelah kanan operator = adalah nilai yang disimpan dalam variabel. Misalnya -&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Operan di sebelah kiri operator = adalah nama variabel dan &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;operand &lt;/ins&gt;di sebelah kanan operator = adalah nilai yang disimpan dalam variabel. Misalnya -&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l20&quot; &gt;Line 20:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 20:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  print name&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  print name&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Here, &lt;/del&gt;100, 1000.0 &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;and &lt;/del&gt;&amp;quot;John&amp;quot; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;are the values assigned to &lt;/del&gt;counter, miles, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;and &lt;/del&gt;name &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;variables, respectively&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;This produces the following result &lt;/del&gt;−&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Disini &lt;/ins&gt;100, 1000.0 &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;dan &lt;/ins&gt;&amp;quot;John&amp;quot; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;adalah nilai yang di masukan ke variabel &lt;/ins&gt;counter, miles, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;dan &lt;/ins&gt;name. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Ini akan menghasilkan keluaran berikut &lt;/ins&gt;−&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;100&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt; &lt;/ins&gt;100&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;1000.0&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt; &lt;/ins&gt;1000.0&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;John&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt; &lt;/ins&gt;John&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Multiple Assignment==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Multiple Assignment==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Onnowpurbo</name></author>
	</entry>
	<entry>
		<id>https://onnocenter.or.id/wiki/index.php?title=Python:_Tipe_Variable&amp;diff=63095&amp;oldid=prev</id>
		<title>Onnowpurbo at 23:43, 25 January 2021</title>
		<link rel="alternate" type="text/html" href="https://onnocenter.or.id/wiki/index.php?title=Python:_Tipe_Variable&amp;diff=63095&amp;oldid=prev"/>
		<updated>2021-01-25T23:43:09Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 23:43, 25 January 2021&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Variables are nothing but reserved memory locations to store values&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;This means that when you create a variable you reserve some space in memory&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Variabel hanyalah lokasi memori yang dicadangkan untuk menyimpan nilai&lt;/ins&gt;. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Ini berarti bahwa ketika kita membuat variabel, kita menyediakan beberapa tempat / lokasi di memori&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Based on the &lt;/del&gt;data &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;type of a variable&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;the &lt;/del&gt;interpreter &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;allocates memory and decides what can be stored in the reserved memory&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Therefore&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;by assigning different &lt;/del&gt;data &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;types to variables&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;you can store integers&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;decimals or characters in these variables&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Berdasarkan tipe &lt;/ins&gt;data &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;variabel&lt;/ins&gt;, interpreter &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;mengalokasikan memori dan memutuskan apa yang dapat disimpan dalam memori yang dicadangkan&lt;/ins&gt;. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Oleh karena itu&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;dengan menetapkan tipe &lt;/ins&gt;data &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;yang berbeda ke variabel&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;kita dapat menyimpan bilangan bulat&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;desimal, atau karakter dalam variabel ini&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Assigning Values to Variables&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;=Memasukan Nilai ke Variabel==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Python variables do not need explicit declaration to reserve memory space. The declaration happens automatically when you assign a value to a variable. The equal sign (&lt;/del&gt;=&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;) is used to assign values to variables.&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;The operand to the left of the &lt;/del&gt;= operator &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;is the name of the variable and the operand to the right of the &lt;/del&gt;= operator &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;is the value stored in the variable&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;For example −&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Variabel Python tidak membutuhkan deklarasi eksplisit untuk memesan tempat memori. Deklarasi terjadi secara otomatis saat kita menetapkan nilai ke variabel. Tanda sama dengan (&lt;/ins&gt;=&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;) digunakan untuk menetapkan nilai ke variabel.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Operan di sebelah kiri &lt;/ins&gt;operator = &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;adalah nama variabel dan operan di sebelah kanan &lt;/ins&gt;operator &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;= adalah nilai yang disimpan dalam variabel&lt;/ins&gt;. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Misalnya -&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Onnowpurbo</name></author>
	</entry>
	<entry>
		<id>https://onnocenter.or.id/wiki/index.php?title=Python:_Tipe_Variable&amp;diff=63094&amp;oldid=prev</id>
		<title>Onnowpurbo at 23:03, 25 January 2021</title>
		<link rel="alternate" type="text/html" href="https://onnocenter.or.id/wiki/index.php?title=Python:_Tipe_Variable&amp;diff=63094&amp;oldid=prev"/>
		<updated>2021-01-25T23:03:44Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;a href=&quot;https://onnocenter.or.id/wiki/index.php?title=Python:_Tipe_Variable&amp;amp;diff=63094&amp;amp;oldid=63093&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>Onnowpurbo</name></author>
	</entry>
	<entry>
		<id>https://onnocenter.or.id/wiki/index.php?title=Python:_Tipe_Variable&amp;diff=63093&amp;oldid=prev</id>
		<title>Onnowpurbo: Created page with &quot;Variables are nothing but reserved memory locations to store values. This means that when you create a variable you reserve some space in memory.  Based on the data type of a...&quot;</title>
		<link rel="alternate" type="text/html" href="https://onnocenter.or.id/wiki/index.php?title=Python:_Tipe_Variable&amp;diff=63093&amp;oldid=prev"/>
		<updated>2021-01-25T22:59:39Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;Variables are nothing but reserved memory locations to store values. This means that when you create a variable you reserve some space in memory.  Based on the data type of a...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Variables are nothing but reserved memory locations to store values. This means that when you create a variable you reserve some space in memory.&lt;br /&gt;
&lt;br /&gt;
Based on the data type of a variable, the interpreter allocates memory and decides what can be stored in the reserved memory. Therefore, by assigning different data types to variables, you can store integers, decimals or characters in these variables.&lt;br /&gt;
&lt;br /&gt;
Assigning Values to Variables&lt;br /&gt;
Python variables do not need explicit declaration 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.&lt;br /&gt;
&lt;br /&gt;
The 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 −&lt;br /&gt;
&lt;br /&gt;
Live Demo&lt;br /&gt;
#!/usr/bin/python&lt;br /&gt;
&lt;br /&gt;
counter = 100          # An integer assignment&lt;br /&gt;
miles   = 1000.0       # A floating point&lt;br /&gt;
name    = &amp;quot;John&amp;quot;       # A string&lt;br /&gt;
&lt;br /&gt;
print counter&lt;br /&gt;
print miles&lt;br /&gt;
print name&lt;br /&gt;
Here, 100, 1000.0 and &amp;quot;John&amp;quot; are the values assigned to counter, miles, and name variables, respectively. This produces the following result −&lt;br /&gt;
&lt;br /&gt;
100&lt;br /&gt;
1000.0&lt;br /&gt;
John&lt;br /&gt;
Multiple Assignment&lt;br /&gt;
Python allows you to assign a single value to several variables simultaneously. For example −&lt;br /&gt;
&lt;br /&gt;
a = b = c = 1&lt;br /&gt;
Here, 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 −&lt;br /&gt;
&lt;br /&gt;
a,b,c = 1,2,&amp;quot;john&amp;quot;&lt;br /&gt;
Here, two integer objects with values 1 and 2 are assigned to variables a and b respectively, and one string object with the value &amp;quot;john&amp;quot; is assigned to the variable c.&lt;br /&gt;
&lt;br /&gt;
Standard Data Types&lt;br /&gt;
The data stored in memory can be 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 data types that are used to define the operations possible on them and the storage method for each of them.&lt;br /&gt;
&lt;br /&gt;
Python has five standard data types −&lt;br /&gt;
&lt;br /&gt;
Numbers&lt;br /&gt;
String&lt;br /&gt;
List&lt;br /&gt;
Tuple&lt;br /&gt;
Dictionary&lt;br /&gt;
Python Numbers&lt;br /&gt;
Number data types store numeric values. Number objects are created when you assign a value to them. For example −&lt;br /&gt;
&lt;br /&gt;
var1 = 1&lt;br /&gt;
var2 = 10&lt;br /&gt;
You can also delete the reference to a number object by using the del statement. The syntax of the del statement is −&lt;br /&gt;
&lt;br /&gt;
del var1[,var2[,var3[....,varN]]]]&lt;br /&gt;
You can delete a single object or multiple objects by using the del statement. For example −&lt;br /&gt;
&lt;br /&gt;
del var&lt;br /&gt;
del var_a, var_b&lt;br /&gt;
Python supports four different numerical types −&lt;br /&gt;
&lt;br /&gt;
int (signed integers)&lt;br /&gt;
long (long integers, they can also be represented in octal and hexadecimal)&lt;br /&gt;
float (floating point real values)&lt;br /&gt;
complex (complex numbers)&lt;br /&gt;
Examples&lt;br /&gt;
Here are some examples of numbers −&lt;br /&gt;
&lt;br /&gt;
int	long	float	complex&lt;br /&gt;
10	51924361L	0.0	3.14j&lt;br /&gt;
100	-0x19323L	15.20	45.j&lt;br /&gt;
-786	0122L	-21.9	9.322e-36j&lt;br /&gt;
080	0xDEFABCECBDAECBFBAEl	32.3+e18	.876j&lt;br /&gt;
-0490	535633629843L	-90.	-.6545+0J&lt;br /&gt;
-0x260	-052318172735L	-32.54e100	3e+26J&lt;br /&gt;
0x69	-4721885298529L	70.2-E12	4.53e-7j&lt;br /&gt;
Python allows you to use a lowercase l with long, but it is recommended that you use only an uppercase L to avoid confusion with the number 1. Python displays long integers with an uppercase L.&lt;br /&gt;
&lt;br /&gt;
A complex number consists of an ordered pair of real floating-point numbers denoted by x + yj, where x and y are the real numbers and j is the imaginary unit.&lt;br /&gt;
&lt;br /&gt;
Python Strings&lt;br /&gt;
Strings in Python are identified as a contiguous set of characters represented in the quotation marks. Python allows for either pairs of single or double quotes. Subsets of strings can be taken using the slice operator ([ ] and [:] ) with indexes starting at 0 in the beginning of the string and working their way from -1 at the end.&lt;br /&gt;
&lt;br /&gt;
The plus (+) sign is the string concatenation operator and the asterisk (*) is the repetition operator. For example −&lt;br /&gt;
&lt;br /&gt;
Live Demo&lt;br /&gt;
#!/usr/bin/python&lt;br /&gt;
&lt;br /&gt;
str = 'Hello World!'&lt;br /&gt;
&lt;br /&gt;
print str          # Prints complete string&lt;br /&gt;
print str[0]       # Prints first character of the string&lt;br /&gt;
print str[2:5]     # Prints characters starting from 3rd to 5th&lt;br /&gt;
print str[2:]      # Prints string starting from 3rd character&lt;br /&gt;
print str * 2      # Prints string two times&lt;br /&gt;
print str + &amp;quot;TEST&amp;quot; # Prints concatenated string&lt;br /&gt;
This will produce the following result −&lt;br /&gt;
&lt;br /&gt;
Hello World!&lt;br /&gt;
H&lt;br /&gt;
llo&lt;br /&gt;
llo World!&lt;br /&gt;
Hello World!Hello World!&lt;br /&gt;
Hello World!TEST&lt;br /&gt;
Python Lists&lt;br /&gt;
Lists are the most versatile of Python's compound data types. A list contains items separated by commas and enclosed within square brackets ([]). To some extent, lists are similar to arrays in C. One difference between them is that all the items belonging to a list can be of different data type.&lt;br /&gt;
&lt;br /&gt;
The values stored in a list can be accessed using the slice operator ([ ] and [:]) with indexes starting at 0 in the beginning of the list and working their way to end -1. The plus (+) sign is the list concatenation operator, and the asterisk (*) is the repetition operator. For example −&lt;br /&gt;
&lt;br /&gt;
#!/usr/bin/python&lt;br /&gt;
&lt;br /&gt;
list = [ 'abcd', 786 , 2.23, 'john', 70.2 ]&lt;br /&gt;
tinylist = [123, 'john']&lt;br /&gt;
&lt;br /&gt;
print list          # Prints complete list&lt;br /&gt;
print list[0]       # Prints first element of the list&lt;br /&gt;
print list[1:3]     # Prints elements starting from 2nd till 3rd &lt;br /&gt;
print list[2:]      # Prints elements starting from 3rd element&lt;br /&gt;
print tinylist * 2  # Prints list two times&lt;br /&gt;
print list + tinylist # Prints concatenated lists&lt;br /&gt;
This produce the following result −&lt;br /&gt;
&lt;br /&gt;
['abcd', 786, 2.23, 'john', 70.2]&lt;br /&gt;
abcd&lt;br /&gt;
[786, 2.23]&lt;br /&gt;
[2.23, 'john', 70.2]&lt;br /&gt;
[123, 'john', 123, 'john']&lt;br /&gt;
['abcd', 786, 2.23, 'john', 70.2, 123, 'john']&lt;br /&gt;
Python Tuples&lt;br /&gt;
A tuple is another sequence data type that is similar to the list. A tuple consists of a number of values separated by commas. Unlike lists, however, tuples are enclosed within parentheses.&lt;br /&gt;
&lt;br /&gt;
The main differences between lists and tuples are: Lists are enclosed in brackets ( [ ] ) and their elements and size can be changed, while tuples are enclosed in parentheses ( ( ) ) and cannot be updated. Tuples can be thought of as read-only lists. For example −&lt;br /&gt;
&lt;br /&gt;
Live Demo&lt;br /&gt;
#!/usr/bin/python&lt;br /&gt;
&lt;br /&gt;
tuple = ( 'abcd', 786 , 2.23, 'john', 70.2  )&lt;br /&gt;
tinytuple = (123, 'john')&lt;br /&gt;
&lt;br /&gt;
print tuple               # Prints the complete tuple&lt;br /&gt;
print tuple[0]            # Prints first element of the tuple&lt;br /&gt;
print tuple[1:3]          # Prints elements of the tuple starting from 2nd till 3rd &lt;br /&gt;
print tuple[2:]           # Prints elements of the tuple starting from 3rd element&lt;br /&gt;
print tinytuple * 2       # Prints the contents of the tuple twice&lt;br /&gt;
print tuple + tinytuple   # Prints concatenated tuples&lt;br /&gt;
This produce the following result −&lt;br /&gt;
&lt;br /&gt;
('abcd', 786, 2.23, 'john', 70.2)&lt;br /&gt;
abcd&lt;br /&gt;
(786, 2.23)&lt;br /&gt;
(2.23, 'john', 70.2)&lt;br /&gt;
(123, 'john', 123, 'john')&lt;br /&gt;
('abcd', 786, 2.23, 'john', 70.2, 123, 'john')&lt;br /&gt;
The following code is invalid with tuple, because we attempted to update a tuple, which is not allowed. Similar case is possible with lists −&lt;br /&gt;
&lt;br /&gt;
#!/usr/bin/python&lt;br /&gt;
&lt;br /&gt;
tuple = ( 'abcd', 786 , 2.23, 'john', 70.2  )&lt;br /&gt;
list = [ 'abcd', 786 , 2.23, 'john', 70.2  ]&lt;br /&gt;
tuple[2] = 1000    # Invalid syntax with tuple&lt;br /&gt;
list[2] = 1000     # Valid syntax with list&lt;br /&gt;
Python Dictionary&lt;br /&gt;
Python's dictionaries are kind of hash table type. They work like associative arrays or hashes found in Perl and consist of key-value pairs. A dictionary key can be almost any Python type, but are usually numbers or strings. Values, on the other hand, can be any arbitrary Python object.&lt;br /&gt;
&lt;br /&gt;
Dictionaries are enclosed by curly braces ({ }) and values can be assigned and accessed using square braces ([]). For example −&lt;br /&gt;
&lt;br /&gt;
Live Demo&lt;br /&gt;
#!/usr/bin/python&lt;br /&gt;
&lt;br /&gt;
dict = {}&lt;br /&gt;
dict['one'] = &amp;quot;This is one&amp;quot;&lt;br /&gt;
dict[2]     = &amp;quot;This is two&amp;quot;&lt;br /&gt;
&lt;br /&gt;
tinydict = {'name': 'john','code':6734, 'dept': 'sales'}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
print dict['one']       # Prints value for 'one' key&lt;br /&gt;
print dict[2]           # Prints value for 2 key&lt;br /&gt;
print tinydict          # Prints complete dictionary&lt;br /&gt;
print tinydict.keys()   # Prints all the keys&lt;br /&gt;
print tinydict.values() # Prints all the values&lt;br /&gt;
This produce the following result −&lt;br /&gt;
&lt;br /&gt;
This is one&lt;br /&gt;
This is two&lt;br /&gt;
{'dept': 'sales', 'code': 6734, 'name': 'john'}&lt;br /&gt;
['dept', 'code', 'name']&lt;br /&gt;
['sales', 6734, 'john']&lt;br /&gt;
Dictionaries have no concept of order among elements. It is incorrect to say that the elements are &amp;quot;out of order&amp;quot;; they are simply unordered.&lt;br /&gt;
&lt;br /&gt;
Data Type Conversion&lt;br /&gt;
Sometimes, you may need to perform conversions between the built-in types. To convert between types, you simply use the type name as a function.&lt;br /&gt;
&lt;br /&gt;
There are several built-in functions to perform conversion from one data type to another. These functions return a new object representing the converted value.&lt;br /&gt;
&lt;br /&gt;
Sr.No.	Function &amp;amp; Description&lt;br /&gt;
1	&lt;br /&gt;
int(x [,base])&lt;br /&gt;
&lt;br /&gt;
Converts x to an integer. base specifies the base if x is a string.&lt;br /&gt;
&lt;br /&gt;
2	&lt;br /&gt;
long(x [,base] )&lt;br /&gt;
&lt;br /&gt;
Converts x to a long integer. base specifies the base if x is a string.&lt;br /&gt;
&lt;br /&gt;
3	&lt;br /&gt;
float(x)&lt;br /&gt;
&lt;br /&gt;
Converts x to a floating-point number.&lt;br /&gt;
&lt;br /&gt;
4	&lt;br /&gt;
complex(real [,imag])&lt;br /&gt;
&lt;br /&gt;
Creates a complex number.&lt;br /&gt;
&lt;br /&gt;
5	&lt;br /&gt;
str(x)&lt;br /&gt;
&lt;br /&gt;
Converts object x to a string representation.&lt;br /&gt;
&lt;br /&gt;
6	&lt;br /&gt;
repr(x)&lt;br /&gt;
&lt;br /&gt;
Converts object x to an expression string.&lt;br /&gt;
&lt;br /&gt;
7	&lt;br /&gt;
eval(str)&lt;br /&gt;
&lt;br /&gt;
Evaluates a string and returns an object.&lt;br /&gt;
&lt;br /&gt;
8	&lt;br /&gt;
tuple(s)&lt;br /&gt;
&lt;br /&gt;
Converts s to a tuple.&lt;br /&gt;
&lt;br /&gt;
9	&lt;br /&gt;
list(s)&lt;br /&gt;
&lt;br /&gt;
Converts s to a list.&lt;br /&gt;
&lt;br /&gt;
10	&lt;br /&gt;
set(s)&lt;br /&gt;
&lt;br /&gt;
Converts s to a set.&lt;br /&gt;
&lt;br /&gt;
11	&lt;br /&gt;
dict(d)&lt;br /&gt;
&lt;br /&gt;
Creates a dictionary. d must be a sequence of (key,value) tuples.&lt;br /&gt;
&lt;br /&gt;
12	&lt;br /&gt;
frozenset(s)&lt;br /&gt;
&lt;br /&gt;
Converts s to a frozen set.&lt;br /&gt;
&lt;br /&gt;
13	&lt;br /&gt;
chr(x)&lt;br /&gt;
&lt;br /&gt;
Converts an integer to a character.&lt;br /&gt;
&lt;br /&gt;
14	&lt;br /&gt;
unichr(x)&lt;br /&gt;
&lt;br /&gt;
Converts an integer to a Unicode character.&lt;br /&gt;
&lt;br /&gt;
15	&lt;br /&gt;
ord(x)&lt;br /&gt;
&lt;br /&gt;
Converts a single character to its integer value.&lt;br /&gt;
&lt;br /&gt;
16	&lt;br /&gt;
hex(x)&lt;br /&gt;
&lt;br /&gt;
Converts an integer to a hexadecimal string.&lt;br /&gt;
&lt;br /&gt;
17	&lt;br /&gt;
oct(x)&lt;br /&gt;
&lt;br /&gt;
Converts an integer to an octal string.&lt;/div&gt;</summary>
		<author><name>Onnowpurbo</name></author>
	</entry>
</feed>