mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-05 09:21:13 +08:00
MAINT: Updated f-string method (#6230)
* MAINT: Used f-string method Updated the code with f-string methods wherever required for a better and cleaner understanding of the code. * Updated files with f-string method * Update rsa_key_generator.py * Update rsa_key_generator.py * Update elgamal_key_generator.py * Update lru_cache.py I don't think this change is efficient but it might tackle the error as the error was due to using long character lines. * Update lru_cache.py * Update lru_cache.py Co-authored-by: cyai <seriesscar@gmail.com> Co-authored-by: Christian Clauss <cclauss@me.com>
This commit is contained in:
@ -25,14 +25,14 @@ def build_tree():
|
||||
q.put(tree_node)
|
||||
while not q.empty():
|
||||
node_found = q.get()
|
||||
msg = "Enter the left node of %s: " % node_found.data
|
||||
msg = f"Enter the left node of {node_found.data}: "
|
||||
check = input(msg).strip().lower() or "n"
|
||||
if check == "n":
|
||||
return tree_node
|
||||
left_node = TreeNode(int(check))
|
||||
node_found.left = left_node
|
||||
q.put(left_node)
|
||||
msg = "Enter the right node of %s: " % node_found.data
|
||||
msg = f"Enter the right node of {node_found.data}: "
|
||||
check = input(msg).strip().lower() or "n"
|
||||
if check == "n":
|
||||
return tree_node
|
||||
|
Reference in New Issue
Block a user