answersLogoWhite

0

>>> string = 'slice'

>>> letters = list(string)

>>> print letters

['s', 'l', 'i', 'c', 'e']

>>> string2 = ''

>>> for letter in letters:

string2 += letter

print string2

s

sl

sli

slic

slice

User Avatar

Wiki User

14y ago

What else can I help you with?

Related Questions

What is the hip-bone of a python an example of?

It is an example of something that doesn't exist. Or it could be an infinity unlikely retro mutation related to re-expression of the HOX gene pattern found in python's ancient ancestors, the lizards.


Why is the diamond python called the diamond python?

pattern


What is the difference between a ball python and a bald python?

A pied bald python is a morph pattern found in Ball python that is being breed in captivety.


Which of the following function convert an object to a string in python?

By using "str()". Example: number = 2 yourNumber = print("Your number is %s!") % (str(number))


How scientific name are important?

Scientific names are unique to one specific instance. For example - A Burmese python and an Indian python look very similar in colour and markings. Therefore the Burmese python has been given the scientific name 'Python bivittatus. The Indian python is named Python molurus.


How to cite Python in academic writing and research papers?

To cite Python in academic writing and research papers, include the version of Python used, the date accessed, and the URL of the Python website. For example: Python Software Foundation. (2021). Python 3.9.6 Documentation. Retrieved from https://docs.python.org/3.9/.


What is scientific name of pyton?

The scientific name of the python varies depending on the specific species. For example, the common or Indian python is known as Python molurus, while the reticulated python is referred to as Python reticulatus. There are several other species within the genus Python, each with its own scientific designation.


What is meant by functions on python?

Python programming allows you to write your own programs. For example, to write a function named double that returns the number that you input, but doubled, we would write the following (where >>>> indicates a tab space) def double(x): >>>>x=x*2 >>>>return x


What happened to the append function in python?

It's still there... Type the following into a python prompt... x = [7,4,3] x.append(5) print(x) and you get the result... [7,4,3,5] It's definitely working in python 3


What year is Colt python with py4515 serial number?

about 1958. I assume the letters 'py' are not part of the serial number ????


Where can a reticulated python be found in the wild?

The reticulated python can be found in the wild primarily in Southeast Asia. For example, the reticulated python is found in Burma and Borneo as well as other countries in the region.


What is pythons Latin name?

The Latin name for the python is "Python," which is the genus name that encompasses various species of pythons. For example, the common reticulated python is scientifically known as "Python reticulatus." Other species, like the ball python, are referred to as "Python regius." The genus name reflects their classification within the family Pythonidae.