Skip to content

Commit

Permalink
Fix DeprecationWarning: invalid escape sequence (TheAlgorithms#679)
Browse files Browse the repository at this point in the history
Signed-off-by: Mickaël Schoentgen <[email protected]>
  • Loading branch information
BoboTiG authored and yanglbme committed Jan 8, 2019
1 parent 6128533 commit 3dc5052
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion ciphers/affine_cipher.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from __future__ import print_function
import sys, random, cryptomath_module as cryptoMath

SYMBOLS = """ !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~"""
SYMBOLS = r""" !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~"""

def main():
message = input('Enter message: ')
Expand Down
2 changes: 1 addition & 1 deletion ciphers/rsa_cipher.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

def main():
filename = 'encrypted_file.txt'
response = input('Encrypte\Decrypt [e\d]: ')
response = input(r'Encrypte\Decrypt [e\d]: ')

if response.lower().startswith('e'):
mode = 'encrypt'
Expand Down
4 changes: 2 additions & 2 deletions data_structures/binary tree/AVLtree.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def my_max(a,b):


def leftrotation(node):
'''
r'''
A B
/ \ / \
B C Bl A
Expand Down Expand Up @@ -101,7 +101,7 @@ def rightrotation(node):
return ret

def rlrotation(node):
'''
r'''
A A Br
/ \ / \ / \
B C RR Br C LR B A
Expand Down
4 changes: 2 additions & 2 deletions data_structures/binary tree/binary_search_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ def InPreOrder(curr_node):
return nodeList

def testBinarySearchTree():
'''
r'''
Example
8
/ \
Expand All @@ -206,7 +206,7 @@ def testBinarySearchTree():
4 7 13
'''

'''
r'''
Example After Deletion
7
/ \
Expand Down

0 comments on commit 3dc5052

Please sign in to comment.