Skip to main content
added 9 characters in body
Source Link

Python, 5959 58 bytes

I'm sure there's no real way to beat the Retina version, since this is basically just that within Python. But I think this is my first submission ;)

import re,sys;print(re.match('^[A'[A-Z][a-z]+$',sys.argv[1])) 

It's a very odd truthy value:

(test2)wayne@arglefraster ~/programming/inactive/golf/67554 ⚘ python golf.py AdNan $? 148 %# 3 10:06:36 None (test2)wayne@arglefraster ~/programming/inactive/golf/67554 ⚘ python golf.py Adnan %# 3 10:06:40 <_sre.SRE_Match object at 0x7feefea7f440> (test2)wayne@arglefraster ~/programming/inactive/golf/67554 ⚘ python golf.py "Adnan Banana" %# 3 10:06:47 None 

(And it does require "" around strings with spaces in it, if passed via the shell)

Python, 59 bytes

I'm sure there's no real way to beat the Retina version, since this is basically just that within Python. But I think this is my first submission ;)

import re,sys;print(re.match('^[A-Z][a-z]+$',sys.argv[1])) 

It's a very odd truthy value:

(test2)wayne@arglefraster ~/programming/inactive/golf/67554 ⚘ python golf.py AdNan $? 148 %# 3 10:06:36 None (test2)wayne@arglefraster ~/programming/inactive/golf/67554 ⚘ python golf.py Adnan %# 3 10:06:40 <_sre.SRE_Match object at 0x7feefea7f440> (test2)wayne@arglefraster ~/programming/inactive/golf/67554 ⚘ python golf.py "Adnan Banana" %# 3 10:06:47 None 

(And it does require "" around strings with spaces in it, if passed via the shell)

Python, 59 58 bytes

I'm sure there's no real way to beat the Retina version, since this is basically just that within Python. But I think this is my first submission ;)

import re,sys;print(re.match('[A-Z][a-z]+$',sys.argv[1])) 

It's a very odd truthy value:

(test2)wayne@arglefraster ~/programming/inactive/golf/67554 ⚘ python golf.py AdNan $? 148 %# 3 10:06:36 None (test2)wayne@arglefraster ~/programming/inactive/golf/67554 ⚘ python golf.py Adnan %# 3 10:06:40 <_sre.SRE_Match object at 0x7feefea7f440> (test2)wayne@arglefraster ~/programming/inactive/golf/67554 ⚘ python golf.py "Adnan Banana" %# 3 10:06:47 None 

(And it does require "" around strings with spaces in it, if passed via the shell)

Source Link

Python, 59 bytes

I'm sure there's no real way to beat the Retina version, since this is basically just that within Python. But I think this is my first submission ;)

import re,sys;print(re.match('^[A-Z][a-z]+$',sys.argv[1])) 

It's a very odd truthy value:

(test2)wayne@arglefraster ~/programming/inactive/golf/67554 ⚘ python golf.py AdNan $? 148 %# 3 10:06:36 None (test2)wayne@arglefraster ~/programming/inactive/golf/67554 ⚘ python golf.py Adnan %# 3 10:06:40 <_sre.SRE_Match object at 0x7feefea7f440> (test2)wayne@arglefraster ~/programming/inactive/golf/67554 ⚘ python golf.py "Adnan Banana" %# 3 10:06:47 None 

(And it does require "" around strings with spaces in it, if passed via the shell)