Skip to content

Instantly share code, notes, and snippets.

@huzefamehidpurwala
Created January 22, 2023 05:22
Show Gist options
  • Save huzefamehidpurwala/5855c06746e1268c8e500b256523e117 to your computer and use it in GitHub Desktop.
Save huzefamehidpurwala/5855c06746e1268c8e500b256523e117 to your computer and use it in GitHub Desktop.
This python script takes a string of all related kewords and returns a non repeating keyword string to clipboard.
from os import system
system("cls")
flag = True
while flag:
string = input("Enter the words: ").split()
system("cls")
if not string:
flag = False
print("Thank You for our services...!")
exit()
new_str = []
for word in string:
word = word.strip()
if word not in new_str:
# print(word)
new_str.append(word)
keywords = " ".join(new_str)
print("\n", keywords, end="\n\n")
system(f"echo {keywords} | clip")
print("------------ Copied to clipboard ------------", end="\n\n")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment