import os

username=input("Which User's Login History Do You Want To Check?:")
command="last |grep ppp | grep "+username
os.system(command)

653cc20178fae292b82179b6dfdec95cb19c6fb1
<mask token>

<mask token>
os.system(command)

<mask token>
username = input("Which User's Login History Do You Want To Check?:")
command = 'last |grep ppp | grep ' + username
os.system(command)

import os
username = input("Which User's Login History Do You Want To Check?:")
command = 'last |grep ppp | grep ' + username
os.system(command)

import os

username=input("Which User's Login History Do You Want To Check?:")
command="last |grep ppp | grep "+username
os.system(command)
