Explanation
In this program, we need to separate each character from the string.
CHARACTERS
In computer science, collection of characters including spaces is called as string. To separate an individual character from the string, individual character are accessed through its index.
Algorithm
- Define a string.
- Define a for-loop in which loop variable will start from 0 and end at length of the string.
- To separate each character, we will print the character present at every index.
- To visualize this, we have separated each character by a space.
Input:
string = "characters"
Output:
Individual characters from given string: characters
Python
Output:
C
Output:
JAVA
Output:
C#
Output:
PHP
Output: