I am having a small confusion on assigning variable to another variable . I have a code which takes value in a filter variable as
filter = '(uid=tommy)'
I am trying to pass tommy via command line using
user_id = sys.argv[1:]
print user_id
filter = '(uid=user_id)'
But of-course this doesn't replace the variable user_id , how can i achieve this ??
filter = '(uid={})'.format(user_id)