You are modifying the manifest data here (it should be static). Build a new array instead, then you don't need the awkward `range(len(user_cmd))` either.

p.s.: You can do the same thing with
for idx, elm in enumerate(user_cmd):