Built-in-Methods of String Datatype Part -II

Shubham Hanmant Pawar
3 min readSep 30, 2023

--

14. Isnumeric

Returns True if all the characters are numeric (0–9), otherwise False.

15. Isprintable

Returns True if all the characters are printable, otherwise False.

16. Isspace

Returns True if all the characters in a string are whitespaces, otherwise False.

17. Istitle

Returns True if all words in a text start with an upper case letter, AND the rest of the words are lower case letters, otherwise False.

18. Isupper

Returns True if all the characters are in upper case, otherwise False.

19. join

Takes all items in an iterable and joins them into one string.

20. ljust

Will left align the string, using a specified character (space is the default) as the fill character.

21. lower

Returns the lowercase string from the given string.

22. lstrip

Returns a copy of the string by removing leading characters specified as an argument.

23. partition

Takes a string parameter separator that separates the string at the first occurrence of it.

24. removeprefix

Removes the prefix and returns the rest of the string.

25. removesuffix

It removes the substring if it is found in the end, and returns the remaining string.

26. replace

Replaces a specified phrase with another specified phrase.

27. rfind

Returns the index of the last occurrence of a substring in the given string, and if not found, then it returns -1.

28. split

A string at the specified separator and returns a list of substrings.

#vevcodelab

http://vevcodelab.com/

--

--

No responses yet