<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>what is tuple in python - Wikitechy</title>
	<atom:link href="https://www.wikitechy.com/interview-questions/tag/what-is-tuple-in-python/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.wikitechy.com/interview-questions/tag/what-is-tuple-in-python/</link>
	<description>Interview Questions</description>
	<lastBuildDate>Tue, 16 Aug 2022 10:22:06 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9</generator>

<image>
	<url>https://www.wikitechy.com/interview-questions/wp-content/uploads/2025/10/cropped-wikitechy-icon-32x32.png</url>
	<title>what is tuple in python - Wikitechy</title>
	<link>https://www.wikitechy.com/interview-questions/tag/what-is-tuple-in-python/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>What is Tuple in python ?</title>
		<link>https://www.wikitechy.com/interview-questions/python/what-is-tuple-in-python/</link>
					<comments>https://www.wikitechy.com/interview-questions/python/what-is-tuple-in-python/#respond</comments>
		
		<dc:creator><![CDATA[webmaster]]></dc:creator>
		<pubDate>Tue, 16 Aug 2022 10:21:41 +0000</pubDate>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[list vs tuple in python]]></category>
		<category><![CDATA[python tuple append]]></category>
		<category><![CDATA[python tuple index]]></category>
		<category><![CDATA[tuple example]]></category>
		<category><![CDATA[tuple in python example]]></category>
		<category><![CDATA[tuple is mutable or immutable]]></category>
		<category><![CDATA[tuple pronunciation]]></category>
		<category><![CDATA[tuple vs list]]></category>
		<category><![CDATA[what is a tuple object in python what is named tuple in python what is the difference between list tuple and set in python]]></category>
		<category><![CDATA[what is difference between list and tuple in python]]></category>
		<category><![CDATA[what is list and tuple in python]]></category>
		<category><![CDATA[what is list tuple and dictionary in python]]></category>
		<category><![CDATA[what is tuple in python]]></category>
		<category><![CDATA[what is tuple in python 3]]></category>
		<category><![CDATA[what is tuple unpacking in python]]></category>
		<guid isPermaLink="false">https://www.wikitechy.com/interview-questions/?p=4694</guid>

					<description><![CDATA[In python Tuple is used to store the sequence of immutable Python objects. It is similar to lists since the value of the items stored in the list can be changed. If the tuple is immutable then the value of the items stored in the tuple cannot be changed. It can be written as the [&#8230;]]]></description>
										<content:encoded><![CDATA[<ul>
<li style="text-align: justify;">In python Tuple is used to store the sequence of immutable Python objects.</li>
<li style="text-align: justify;">It is similar to lists since the value of the items stored in the list can be changed.</li>
<li style="text-align: justify;">If the tuple is immutable then the value of the items stored in the tuple cannot be changed.</li>
<li style="text-align: justify;">It can be written as the collection of comma-separated (,) values enclosed with the small () brackets.</li>
<li style="text-align: justify;">The parentheses are optional but it is good practice to use.</li>
<li style="text-align: justify;">A tuple is indexed in the same way as the lists then items in the tuples can be accessed by using their specific index value.</li>
<li style="text-align: justify;">Using negative indexing tuple element can also access then index of -1 denotes the rightmost element and -2 to the second last item and so on.</li>
<li style="text-align: justify;">The tuple items cannot be deleted by using the <strong>del</strong>keyword as tuples are immutable, unlike lists.</li>
<li style="text-align: justify;">We can use del keyword with the tuple name, to delete an entire tuple.</li>
<li style="text-align: justify;">Concatenation (+), Membership (in), repetition (*) are the operators works in the same way as they work with the list.</li>
<li style="text-align: justify;">Using tuple instead of list gives us a clear idea that tuple data is constant and must not be changed.</li>
<li style="text-align: justify;">It can simulate a dictionary without keys and it can be used a dictionary which is consider the following nested structure.</li>
</ul>
<h3 id="sample-code" style="text-align: justify;"><strong>Sample Code</strong></h3>
<div class="code-embed-wrapper"> <div class="code-embed-infos"> </div> <pre class="language-python code-embed-pre line-numbers"  data-start="1" data-line-offset="0"><code class="language-python code-embed-code">tup1 = (&quot;Wikitechy&quot;) <br/>        print(type(tup1))  <br/>        #Creating a tuple with single element   <br/><br/>tup2 = (&quot;Wikitechy&quot;,)  <br/><br/>print(type(tup2))  </code></pre> </div>
<h3 id="output" style="text-align: justify;"><strong>Output</strong></h3>
<p style="text-align: justify;"><img fetchpriority="high" decoding="async" class="alignnone size-full wp-image-4695" src="https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/08/tuple-function.png" alt="" width="1487" height="260" srcset="https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/08/tuple-function.png 1487w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/08/tuple-function-300x52.png 300w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/08/tuple-function-1024x179.png 1024w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/08/tuple-function-768x134.png 768w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/08/tuple-function-390x68.png 390w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/08/tuple-function-820x143.png 820w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/08/tuple-function-1180x206.png 1180w" sizes="(max-width: 1487px) 100vw, 1487px" /></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.wikitechy.com/interview-questions/python/what-is-tuple-in-python/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
