What is Python String ?

What is Python String ?

Python is exponentially growing and is very much popular among data scientists and ml engineers. Python is an object oriented programming language and is a scripting language like php. It is used normally in web development as a server side language. And used in data science and machine intelligence for data analytics, preprocessing, model development etc. This article discusses python’s data type string.

A variable is a container that holds a value of a particular data type. In python, unlike Java the variables are not pre defined with its data type. It gets initialized with the value and its data type can later be known with type(). String being an alpha numeric data type can hold most of the data supplied to it.

Indexing in python allows access to characters at particular locations in the python string. The indexing begins from to the total length of the string -1. The indexing is always done with integers and no other data types instead. Any other data types can cause type error. Indexing makes string manipulation in python easier.

Printing strings with single and double quotes is not allowed as they are already defined in that similar fashion. Escape character backslash (/) is used followed by double quote or single quote.

Triple double quotes are used for declaring long multi-line strings to the variable. When this is preceded by f like in the following example, the variables can be concatenated at those spots mention with curly braces ( {} )

f"""INSERT INTO `blog_content`( `title`, `content`, `author`) VALUES ('{title}','{content}','{author}') """.

Python is picking up pace among developers to become one of the futuristic languages helping developers architect ML models and predict the road their business is taking, helping them make informed decisions. It is helping farmers separate spoiled and good crops. Helping doctors detect retinal diabetes. Working with python becomes easier with virtual environments using pip to install various packages required for development. More and more frameworks are introducing python support. Being open source python has major bug fixes and a huge community support.

#python#codinglanguage#developinglanguage#coding#computerprogramming#pythonprogramming#code#coder#provincieantwerpen#computersecurity #iamnewhere #follow

Promote: support and profit

Support chakrabortysrimanti with a promotion and this post reaches a lot more people. You profit from it by earning 50% of everything this post earns!


- The revenue of this ad will be returned to the Yoors members -
More



20 comments