So I have this list of strings. They all of the strings have a 18 capital letters.
I want to assign each letter a value and them sum up the total score.

window=['SALHWRAAGAATVLLVIVL', 'ALHWRAAGAATVLLVIVLL', 'LHWRAAGAATVLLVIVLLA', 'HWRAAGAATVLLVIVLLAG', 'WRAAGAATVLLVIVLLAGS', 'RAAGAATVLLVIVLLAGSY', 'AAGAATVLLVIVLLAGSYL', 'AGAATVLLVIVLLAGSYLA', 'GAATVLLVIVLLAGSYLAV', 'AATVLLVIVLLAGSYLAVL', 'ATVLLVIVLLAGSYLAVLA', 'TVLLVIVLLAGSYLAVLAE', 'VLLVIVLLAGSYLAVLAER', 'LLVIVLLAGSYLAVLAERG', 'LVIVLLAGSYLAVLAERGA', 'VIVLLAGSYLAVLAERGAP', 'IVLLAGSYLAVLAERGAPG', 'VLLAGSYLAVLAERGAPGA', 'LLAGSYLAVLAERGAPGAQ', 'LAGSYLAVLAERGAPGAQL', 'AGSYLAVLAERGAPGAQLI', 'GSYLAVLAERGAPGAQLIT', 'SYLAVLAERGAPGAQLITY', 'YLAVLAERGAPGAQLITYP', 'LAVLAERGAPGAQLITYPR', 'AVLAERGAPGAQLITYPRA', 'VLAERGAPGAQLITYPRAL', 'LAERGAPGAQLITYPRALW', 'AERGAPGAQLITYPRALWW', 'ERGAPGAQLITYPRALWWS', 'RGAPGAQLITYPRALWWSV', 'GAPGAQLITYPRALWWSVE', 'APGAQLITYPRALWWSVET', 'PGAQLITYPRALWWSVETA', 'GAQLITYPRALWWSVETAT', 'AQLITYPRALWWSVETATT', 'QLITYPRALWWSVETATTV', 'LITYPRALWWSVETATTVG', 'ITYPRALWWSVETATTVGY', 'TYPRALWWSVETATTVGYG', 'YPRALWWSVETATTVGYGD', 'PRALWWSVETATTVGYGDL', 'RALWWSVETATTVGYGDLY', 'ALWWSVETATTVGYGDLYP', 'LWWSVETATTVGYGDLYPV', 'WWSVETATTVGYGDLYPVT', 'WSVETATTVGYGDLYPVTL', 'SVETATTVGYGDLYPVTLW', 'VETATTVGYGDLYPVTLWG', 'ETATTVGYGDLYPVTLWGR', 'TATTVGYGDLYPVTLWGRC', 'ATTVGYGDLYPVTLWGRCV', 'TTVGYGDLYPVTLWGRCVA', 'TVGYGDLYPVTLWGRCVAV', 'VGYGDLYPVTLWGRCVAVV', 'GYGDLYPVTLWGRCVAVVV', 'YGDLYPVTLWGRCVAVVVM', 'GDLYPVTLWGRCVAVVVMV', 'DLYPVTLWGRCVAVVVMVA', 'LYPVTLWGRCVAVVVMVAG', 'YPVTLWGRCVAVVVMVAGI', 'PVTLWGRCVAVVVMVAGIT', 'VTLWGRCVAVVVMVAGITS', 'TLWGRCVAVVVMVAGITSF', 'LWGRCVAVVVMVAGITSFG', 'WGRCVAVVVMVAGITSFGL', 'GRCVAVVVMVAGITSFGLV', 'RCVAVVVMVAGITSFGLVT', 'CVAVVVMVAGITSFGLVTA', 'VAVVVMVAGITSFGLVTAA', 'AVVVMVAGITSFGLVTAAL', 'VVVMVAGITSFGLVTAALA', 'VVMVAGITSFGLVTAALAT', 'VMVAGITSFGLVTAALATW', 'MVAGITSFGLVTAALATWF', 'VAGITSFGLVTAALATWFV', 'AGITSFGLVTAALATWFVG', 'GITSFGLVTAALATWFVGR', 'ITSFGLVTAALATWFVGRE', 'TSFGLVTAALATWFVGREQ', 'SFGLVTAALATWFVGREQE', 'FGLVTAALATWFVGREQER', 'GLVTAALATWFVGREQERR', 'LVTAALATWFVGREQERRG', 'VTAALATWFVGREQERRGH']

Any ideas on how I could do this?

Suppose you have a score function that gives score to each letter.
So the score of all the windows is:
sum(sum(score(c) for c in w) for w in window)

commented: That's a nice-looking one liner. +1
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.