Day 4 | Python 30 Days of Code Challenge | remove first n characters | string | return | slicing |

preview_player
Показать описание
Question: Write a program to remove characters from a string starting from zero up to n and return a new string.

* remove_chars(“Gogeeks”, 3) so output must be eeks . Here we need to remove first three characters from a string.
* remove_chars(“Gogeeks”, 5) so output must be ks. Here we need to remove first five characters from a string.

Note: n must be less than the length of the string.

In this series, I will walk you through 30 days of code challenge day-by-day exercises by Py Native.

On Day 3, we will solve the given problem by using string slicing to get the substring. For example, to remove the first four characters and the remaining use s[4:].

Thanks for watching!!

Please Subscribe to My Channel !!
Share The video || Like ✓ || Comment!!

#python #30dayschallenge #30daysofcode #pynative
Рекомендации по теме