I hereby claim:
- I am nightwarriorftw on github.
- I am nightwarriorxxx (https://keybase.io/nightwarriorxxx) on keybase.
- I have a public key ASBAFPRvlS1KhNR-H1yHOVhYe5HS-GJFrnPJdkZ32hfKlQo
To claim this, I am signing this object:
#! /usr/bin/env python3 | |
def main(): | |
oldList = [1, 2, 3, 4] # defining and initialising the list | |
print(oldList) # print the list | |
reversedList = oldList[::-1] # reversing the list | |
print(reversedList) # printing the reverse list | |
if __name__ == "__main__": |
#! /usr/bin/env python3 | |
def getNewList(empList): | |
# strip the new line and double characters from the element present in the list | |
empList = [name.strip().strip('"') for name in empList] | |
# Generate the list in the required format i.e `last_name, first_name` | |
newList = ["{last}, {first}".format( | |
last=name.split()[1], first=name.split()[0]) for name in empList] | |
return newList |
I hereby claim:
To claim this, I am signing this object:
#!/bin/bash | |
# Simple tcp server using netcat | |
# - depending on the netcat version either use nc -l 5555 or nc -l -p 5555 | |
# - verify with `telnet locahhost 5555` | |
# - quit the telnet with `ctrl-]` and then type quit | |
# - the while loop is there so reopen the port after a client has disconnected | |
# - supports only one client at a time | |
PORT=5555; | |
while :; do nc -l -p $PORT | tee output.log; sleep 1; done |