#!/usr/bin/env python3

import sys

def usage():
    print("Usage: %s <file> <line>" % sys.argv[0])

if len(sys.argv) <= 2:
    usage()

filename, lineno = (sys.argv[1], int(sys.argv[2]))

content = ""
with open(filename, "r") as f:
    content = f.read().split("\n")

new_content = content[:lineno-1] + content[lineno:]

with open(filename, "w+") as f:
    f.seek(0)
    f.write("\n".join(new_content))
