Pyth, 21 20 18 1717 16 bytes
AQVcH)IqxNG0gNhlGIqxNG0:NG"
-1 by using V
instead of FN
because V
implicitly sets N
-2 after some further reading about string slicing options
-1 using x
to check for the presence of the substring at index 0
-1 using replace with "" for getting the end of the string
I'm sure this could use some serious golfing but as a Pyth beginner, just getting it to work was a bonus.
How does it work?
Basically a port of my IBM/Lotus Notes and Python answers...
AQ #Take the input and assign the two parts to variables G and H('Q',eval_input())
VcHassign('[G,H]',Q) #For variable
for N in H.num_to_range(split on spaceschop(H)):
IqxNG0 #If G = the first part ofif equal(index(N...,G),0):
gNhlG #Then implicitly print the remainder of imp_print(at_slice(N,G,""))