80 likes | 170 Vues
This presentation on Strings in Python will help you create strings in Python. You will learn about string indexing. You will also explore the various inbuilt functions in Python that makes it easier to work with strings, concatenate strings and use the format method for doing the same.<br><br>Below topics are covered in this presentation: <br>1. What is a String?<br>2. Creating String in Python<br>3. String Indexing<br>4. String Methods<br>
E N D
What’s in it for you? What is a String? Creating String in Python String Methods String Indexing Hands on Demo
What is a String? In Python, we havestras data type for string A String is an array sequence of characters
Creating string in Python Strings can be defined by surrounding characters inside a single quote or double-quotes Using Single Quotes str1 = ‘Hi INDIA’ Using Double Quotes str2 = “Hi INDIA” Triple-quotes are generally used for multiline string or docstrings str3 = ‘’’Human Psychology is an interesting subject’’’
String Indexing Reverse Index [-7] H Y H E A L T [0] [1] [2] [3] [6] [4] [5] [-6] [-5] [-4] [-1] [-3] [-2] Forward Index
Join us to learn more! simplilearn.com UNITED STATES Simplilearn Solutions Pvt. Limited 201 Spear Street, Suite 1100 San Francisco, CA 94105 Phone: (415) 741-3319 INDIA Simplilearn Solutions Pvt. Limited #53/1C, 24th Main, 2nd Sector HSR Layout, Bangalore 560102 Phone: +91 8069999471 UNITED STATES Simplilearn Solutions Pvt. Limited 801 Corporate Center Drive, Suite 138 Raleigh, NC 27607 Phone: (919) 205-5565