Python Forum
Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Symbols in a String
#1
I am a student and I am currently working on a password scoring program, I need to find a way to identify whether the password entered (the string) contains symbols such as: !, £, $, %, ^, &, * etc.

Any help would be greatly appreciated. Thank you.
Reply
#2
Hi, you could get in touch with your classmate working on same issue and brainstorm it together! It's a great learning strategy.
https://python-forum.io/Thread-Symbol-id...1#pid14241
Reply
#3
(Apr-05-2017, 09:41 AM)MeMeBigBoy Wrote: I am a student and I am currently working on a password scoring program, I need to find a way to identify whether the password entered (the string) contains symbols such as: !, £, $, %, ^, &, * etc.

Any help would be greatly appreciated. Thank you.

symbols = "~`!@#$%^&*()/_-+={}[]:>;',</?*-+"

contains_symbol = False
for symbols in symbols:
    if symbols in pw1:
      contains_symbol = True
      Score+=10
      break
print(contains_symbol)
Reply
#4
FIXED EVERYONE, THANKS FOR THE HELP!

I AM BAD AT PYTHON

(Apr-05-2017, 09:50 AM)MeMeBigBoy Wrote: FIXED EVERYONE, THANKS FOR THE HELP!

Reply
#5
(Apr-05-2017, 09:41 AM)MeMeBigBoy Wrote: I am a student and I am currently working on a password scoring program, I need to find a way to identify whether the password entered (the string) contains symbols such as: !, £, $, %, ^, &, * etc.

Any help would be greatly appreciated. Thank you.

thats nice
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Python script that deletes symbols in plain text nzcan 3 696 Sep-05-2023, 04:03 PM
Last Post: deanhystad
  cyrillic symbols in tables in reportlab. hiroz 5 11,457 Sep-10-2020, 04:57 AM
Last Post: bradmalcom
  Unexpected output: symbols for derivative not being displayed saucerdesigner 0 2,050 Jun-22-2020, 10:06 PM
Last Post: saucerdesigner
  Replacing symbols by " Tiihu 1 1,873 Feb-13-2020, 09:27 PM
Last Post: Larz60+
  How do I delete symbols in a list of strings? Than999 1 2,283 Nov-16-2019, 09:37 PM
Last Post: ibreeden
  Python symbols AND letters gullidog 1 3,499 Apr-05-2017, 10:13 PM
Last Post: ichabod801
  Strings containing both symbols and letters gullidog 13 8,251 Apr-05-2017, 12:27 PM
Last Post: ankit
  Symbols Distinguished From Letters? MeMeBigBoy 3 3,864 Apr-05-2017, 12:21 PM
Last Post: wavic
  How to get pyhton to identify symbols in a string MemeLord15 4 4,324 Apr-05-2017, 11:14 AM
Last Post: wavic

Forum Jump:

User Panel Messages

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