What do you want to save?
Add Code snippet
New code examples
-
Other 2022-02-09 16:30:06
run multiple command line with subprocess
def subprocess_cmd(command): process = subprocess.Popen(command,stdout=subprocess.PIPE, shell=True) proc_stdout = process.communicate()[0].strip() print proc_stdout subprocess_cmd('echo a; echo b') # example single command subprocess.Popen... Add solution -
Python 2022-02-02 21:01:16
initials of a name in python
Raw_name = input("\nEnter Full Name : ") name = Raw_name.strip() bname = name.split(' ') lenofstr = len(bname) fname = bname[0] leofstrstr = str(lenofstr) vlname = int(lenofstr) - 1 lname = bname[int(vlname)] print("\nHi,"+bname[0]) ... Add solution