Post History
Python 3, 2963 bytes This is a simple example answer. The following code takes the newline separated list of all fishes as input and returns the concatenated first 255 of them. def fish_string(a...
#1: Initial revision
## [Python 3](https://www.python.org/), 2963 bytes
This is a simple example answer.
The following code takes the newline separated list of all fishes as input and returns the concatenated first 255 of them.
```python
def fish_string(all_fishes):
fish_list = all_fishes.split("\n")
return "".join(fish_list[:255])
if __name__ == "__main__":
import sys
all_fishes = sys.argv[1]
print(fish_string(all_fishes))
```
This gives the string:
```txt
african glass catfishafrican lungfishaholeholeairbreathing catfishairsac catfishalaska blackfishalbacorealewifealfonsinoalgae eateralligator garalligatorfishamberjackamerican soleamur pikeanchovyanemonefishangelfishanglerangler catfishanglerfishantarctic codantarctic icefishantenna codletarapaimaarcherfisharctic chararmored gurnardarmored searobinarmorheadarmorhead catfisharmoured catfisharowanaarrowtooth eelasian carpasiatic glassfishatka mackerelatlantic bonitoatlantic codatlantic herringatlantic pomfretatlantic salmonatlantic sauryatlantic sharpnose sharkatlantic silversideatlantic spadefishaustralasian salmonaustralian graylingaustralian herringaustralian lungfishaustralian prowfishayubaikal oilfishbala sharkballan wrassebamboo sharkbanded killifishbandfishbangusbanjobanjo catfishbarbbarbelbarbel-less catfishbarbeled dragonfishbarbeled houndsharkbarfishbarracudabarracudinabarramundibarred daniobarreleyebasking sharkbassbassletbat raybatfishbeachsalmonbeaked salmonbeaked sandfishbeardfishbeluga sturgeonbengal daniobettabichirbicolor goat fishbigeyebigeye squaretailbighead carpbigmouth buffalobigscalebigscale pomfretbillfishbitterlingblack angelfishblack bassblack dragonfishblack mackerelblack neon tetrablack scabbardfishblack scalyfinblack sea bassblack swallowerblack tetrablack triggerfishblackchinblackfin tunablackfishblacktip reef sharkbleakblennyblind gobyblind sharkblobfishblowfishblue catfishblue danioblue eye trevallablue gouramiblue sharkblue triggerfishblue whitingblue-redstripe daniobluefin tunabluefishbluegillbluntnose knifefishbluntnose minnowboafishboarfishbobtail snipe eelbocacciobogabombay duckbonefishbonitobonnethead sharkbonnetmouthbonytailbonytonguebowfinboxfishbramble sharkbreambrillbristlemouthbristlenose catfishbroadband dogfishbronze corydorasbrook lampreybrook sticklebackbrook troutbrotulabrown troutbuffalo fishbull sharkbull troutbullheadbullhead sharkbumblebee gobyburbotburiburma danioburrowing gobybutterfishbutterfly raybutterflyfishcalifornia flyingfishcalifornia halibutcanary rockfishcandirucandlefishcapelincardinal tetracardinalfishcarpcarpetsharkcarpsuckercat sharkcatalufacatfishcatlacave angelfishcavefishcelebes rainbowfishcentral mudminnowchain pickerelchannel basschannel catfishcharcherry salmoncherubfishchimaerachinook salmonchubchubsuckerchum salmoncichlidciscoclimbing catfishclimbing gouramiclimbing perchclingfishclown loachclown triggerfishclownfishcobblercobiacodcodletcodlingcoelacanthcoffinfishcoho salmoncoleycollared carpetsharkcollared dogfishcolorado squawfishcombfishcombtail gouramicombtooth blennycommon carpcommon tunnyconger eelconvict blennyconvict cichlidcookie-cutter sharkcoolie loachcornetfishcow sharkcowfishcownose raycrappiecreek chubcrestfishcrevice kelpfishcroakercrocodile icefishcrocodile sharkcrucian carpcuckoo wrassecuskcusk-eelcutlassfishcutthroat eelcutthroat troutdabdacedaggertooth pike congerdamselfishdaniodarterdartfishdealfishdeath valley pupfish
```
The [online validator](https://trichoplax.github.io/cod-golf-validator/) shows the score of 2963 (the length of the string) and that there are 1087 fishes included (even though only 255 were explicitly concatenated). In fact, only 4 of the total 1091 fishes are excluded. All of the others are accidentally included, because letters from the first 255 happen to be in the correct order to spell out others. This gives an idea of how much this could be improved.
To generate this string, you can save the code as `cod-golf-answer.py` and then enter the following in the terminal, pasting in the newline separated list of all fishes from the challenge wording between the double quotes:
```bash
python cod-golf-answer.py ""
```
