<?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>Strings | Student Projects</title>
	<atom:link href="https://studentprojects.in/tag/strings/feed/" rel="self" type="application/rss+xml" />
	<link>https://studentprojects.in</link>
	<description>Microcontroller projects, Circuit Diagrams, Project Ideas</description>
	<lastBuildDate>Wed, 28 Sep 2022 16:31:20 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.1.7</generator>
	<item>
		<title>Strings</title>
		<link>https://studentprojects.in/software-development/strings/</link>
					<comments>https://studentprojects.in/software-development/strings/#respond</comments>
		
		<dc:creator><![CDATA[Shubhajna Rai]]></dc:creator>
		<pubDate>Wed, 28 Sep 2022 16:31:19 +0000</pubDate>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Strings]]></category>
		<guid isPermaLink="false">https://studentprojects.in/?p=9574</guid>

					<description><![CDATA[<p>In Python, strings are among the most widely used types. They are easily made by simply surrounding characters in quotations. Python treats single quotes and double quotes the same way. Assigning a value to a variable and creating a string is really straightforward. Example: var1 = &#8216;Hello World!&#8217; var2 = &#8220;Python Programming&#8221; Python doesn&#8217;t have</p>
<p>The post <a href="https://studentprojects.in/software-development/strings/">Strings</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>In Python, strings are among the most widely used types. They are easily made by simply surrounding characters in quotations. Python treats single quotes and double quotes the same way. Assigning a value to a variable and creating a string is really straightforward.</p>



<p>Example:</p>



<p>var1 = &#8216;Hello World!&#8217;</p>



<p>var2 = &#8220;Python Programming&#8221;</p>



<p>Python doesn&#8217;t have a character type; as they are viewed as one-length strings, they are also regarded as substrings.</p>



<p>Use the index or indices to get your substring along with the square brackets for slicing to access substrings.</p>



<p>#!/usr/bin/python</p>



<p>var1 = &#8216;Hello World!&#8217;</p>



<p>var2 = &#8220;Python Programming&#8221;</p>



<p>print &#8220;var1[0]: &#8220;, var1[0]</p>



<p>print &#8220;var2[1:5]: &#8220;, var2[1:5]</p>



<p>The outcome of running the aforementioned code is the following:</p>



<p>var1[0]:&nbsp; H</p>



<p>var2[1:5]:&nbsp; ytho</p>



<p>By (re)assigning a variable to another string, you can &#8220;update&#8221; an already-existing string. The new value may be connected to the old value or to an entirely separate string. For instance,</p>



<p>#!/usr/bin/python</p>



<p>var1 = &#8216;Hello World!&#8217;</p>



<p>print &#8220;Updated String :- &#8220;, var1[:6] + &#8216;Python&#8217;</p>



<p>The outcome of running the aforementioned code is the following:</p>



<p>updated String :-&nbsp; Hello Python</p><p>The post <a href="https://studentprojects.in/software-development/strings/">Strings</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://studentprojects.in/software-development/strings/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
