-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
sirisatwika
committed
Apr 28, 2021
1 parent
dd5f67e
commit d046725
Showing
4 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
a = True | ||
b = False | ||
a = a or b | ||
b = a and b | ||
a = a or b | ||
print(a,b) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
def firstchar_Change(string): | ||
char = string[0] | ||
string = string.replace(char, '$') | ||
string = char + string[1:] | ||
return string | ||
print(change_char(input())) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
def firstrepeatedChar(str): | ||
h = {} | ||
for ch in str: | ||
if ch in h: | ||
return ch | ||
else: | ||
h[ch] = 1 | ||
return "No repated character" | ||
print(firstRepeatedChar(input("Enter a string : "))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
def remove_nth(string, n): | ||
a = string[:n] | ||
b = string[n+1:] | ||
return a + b | ||
print(remove_nth(input("Enter the string : "), int(input("Enter the index : ")))) |