Skip to main content
added 70 characters in body
Source Link
ElPedro
  • 6.5k
  • 2
  • 24
  • 38

Pyth, 21 20 18 1717 16 bytes

AQVcH)IqxNG0gNhlGIqxNG0:NG"

Try it online!Try it online!

-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,""))

Pyth, 21 20 18 17 bytes

AQVcH)IqxNG0gNhlG

Try it online!

-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

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
VcH)              #For variable N in H.(split on spaces)
IqxNG0            #If G = the first part of N...
gNhlG             #Then implicitly print the remainder of N

Pyth, 21 20 18 17 16 bytes

AQVcH)IqxNG0:NG"

Try it online!

-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?

assign('Q',eval_input())
assign('[G,H]',Q)
for N in num_to_range(chop(H)):
    if equal(index(N,G),0):
        imp_print(at_slice(N,G,""))
added 79 characters in body
Source Link
ElPedro
  • 6.5k
  • 2
  • 24
  • 38

Pyth, 21 20 1818 17 bytes

AQVcH)IqG<NlGgNhlGIqxNG0gNhlG

Try it online!Try it online!

-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

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
VcH)              #For variable N in H.(split on spaces)
IqG<NlGIqxNG0            #If G = the first part of N...
gNhlG             #Then implicitly print the remainder of N

Pyth, 21 20 18 bytes

AQVcH)IqG<NlGgNhlG

Try it online!

-1 by using V instead of FN because V implicitly sets N

-2 after some further reading about string slicing options

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
VcH)              #For variable N in H.(split on spaces)
IqG<NlG           #If G = the first part of N...
gNhlG             #Then implicitly print the remainder of N

Pyth, 21 20 18 17 bytes

AQVcH)IqxNG0gNhlG

Try it online!

-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

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
VcH)              #For variable N in H.(split on spaces)
IqxNG0            #If G = the first part of N...
gNhlG             #Then implicitly print the remainder of N
added 67 characters in body
Source Link
ElPedro
  • 6.5k
  • 2
  • 24
  • 38

Pyth, 21 2020 18 bytes

AQVcH)IqG:NZlG:NlGlNIqG<NlGgNhlG

Try it online!Try it online!

-1 by using V instead of FN because V implicitly sets N

-2 after some further reading about string slicing options

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
VcH)              #For variable N in H.(split on spaces)
IqG:N0lGIqG<NlG           #If G = the first part of N...
:NlGlNgNhlG             #Then implicitly print the remainder of N

Pyth, 21 20 bytes

AQVcH)IqG:NZlG:NlGlN

Try it online!

-1 by using V instead of FN because V implicitly sets N

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
VcH)              #For variable N in H.(split on spaces)
IqG:N0lG          #If G = the first part of N...
:NlGlN            #Then implicitly print the remainder of N

Pyth, 21 20 18 bytes

AQVcH)IqG<NlGgNhlG

Try it online!

-1 by using V instead of FN because V implicitly sets N

-2 after some further reading about string slicing options

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
VcH)              #For variable N in H.(split on spaces)
IqG<NlG           #If G = the first part of N...
gNhlG             #Then implicitly print the remainder of N
deleted 86 characters in body
Source Link
ElPedro
  • 6.5k
  • 2
  • 24
  • 38
Loading
edited body
Source Link
ElPedro
  • 6.5k
  • 2
  • 24
  • 38
Loading
added 32 characters in body
Source Link
ElPedro
  • 6.5k
  • 2
  • 24
  • 38
Loading
added 43 characters in body
Source Link
ElPedro
  • 6.5k
  • 2
  • 24
  • 38
Loading
added 2 characters in body
Source Link
ElPedro
  • 6.5k
  • 2
  • 24
  • 38
Loading
edited body
Source Link
ElPedro
  • 6.5k
  • 2
  • 24
  • 38
Loading
edited body
Source Link
ElPedro
  • 6.5k
  • 2
  • 24
  • 38
Loading
Source Link
ElPedro
  • 6.5k
  • 2
  • 24
  • 38
Loading