Python Forum
find a character in a string in python3
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
find a character in a string in python3
#1
Hello, how do I find a specific character in a string? for example, str="Hello world"
I need it to ba able to return the character "w", not just its index. Thanks.
Reply


Messages In This Thread
find a character in a string in python3 - by tony1812 - Sep-26-2017, 10:31 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Python3 string slicing Luchano55 4 576 Feb-17-2024, 09:40 AM
Last Post: Pedroski55
  use of escape character in re.sub and find WJSwan 1 904 Feb-16-2023, 05:19 PM
Last Post: Larz60+
  Writing string to file results in one character per line RB76SFJPsJJDu3bMnwYM 4 1,356 Sep-27-2022, 01:38 PM
Last Post: buran
  Find and Replace numbers in String giddyhead 2 1,218 Jul-17-2022, 06:22 PM
Last Post: giddyhead
  Regex: a string does not starts and ends with the same character Melcu54 5 2,396 Jul-04-2021, 07:51 PM
Last Post: Melcu54
  [solved] unexpected character after line continuation character paul18fr 4 3,378 Jun-22-2021, 03:22 PM
Last Post: deanhystad
  Find string between two substrings, in a stream of data xbit 1 2,140 May-09-2021, 03:32 PM
Last Post: bowlofred
  Regular expression: cannot find 1st number in a string Pavel_47 2 2,406 Jan-15-2021, 04:39 PM
Last Post: bowlofred
  convert string into multiple columns in python3 VAN 2 2,749 Sep-26-2020, 11:14 PM
Last Post: scidam
  find a string in a field in MongoDB Leon79 2 2,406 Jul-19-2020, 09:20 PM
Last Post: menator01

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020