Skip to content

Commit 943e4a3

Browse files
2 parents e295ebc + e0ced62 commit 943e4a3

File tree

3 files changed

+2
-6
lines changed

3 files changed

+2
-6
lines changed

String's/String Validators.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
st = input()
2-
32
print(any(ch.isalnum() for ch in st))
43
print(any(ch.isalpha() for ch in st))
54
print(any(ch.isdigit() for ch in st))
65
print(any(ch.islower() for ch in st))
76
print(any(ch.isupper() for ch in st))
87

9-
108
# Any
119
# Returns true if any of the items is True. It returns False
1210
# if empty or all are false. Any can be thought of as a sequence
1311
# of OR operations on the provided iterables.
1412
# It short circuit the execution i.e. stop the execution as soon
1513
# as the result is known.
1614

17-
# Syntax : any(list of iterables)
15+
# Syntax : any(list of iterables)

String's/Text Alignment.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#Replace all ______ with rjust, ljust or center.
2-
32
thickness = int(input()) #This must be an odd number
43
c = 'H'
54

String's/Text Wrap.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
import textwrap
2-
32
def wrap(string, max_width):
43
return(textwrap.fill(string,max_width))
54

65
if __name__ == '__main__':
76
string, max_width = input(), int(input())
87
result = wrap(string, max_width)
9-
print(result)
8+
print(result)

0 commit comments

Comments
 (0)